Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
log reason string on transaction failure
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincburns committed Aug 22, 2018
1 parent 119c78b commit 8d311f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/statemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,9 @@ StateManager.prototype.printTransactionReceipt = function(tx_hash, error, callba

if (error) {
self.logger.log(" Runtime Error: " + error.error);
if (error.reason) {
self.logger.log(" Revert reason: " + error.reason);
}
}

self.logger.log("");
Expand Down

0 comments on commit 8d311f3

Please sign in to comment.