Unverified Commit abad6d61 authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #759 from ethereum/handle_error

handle error from runTx
parents 52f37734 30463c9a
...@@ -116,7 +116,9 @@ TxRunner.prototype.runInVm = function (from, to, data, value, gasLimit, useCall, ...@@ -116,7 +116,9 @@ TxRunner.prototype.runInVm = function (from, to, data, value, gasLimit, useCall,
executionContext.vm().stateManager.revert(function () {}) executionContext.vm().stateManager.revert(function () {})
} }
err = err ? err.message : err err = err ? err.message : err
result.status = '0x' + result.vm.exception.toString(16) if (result) {
result.status = '0x' + result.vm.exception.toString(16)
}
callback(err, { callback(err, {
result: result, result: result,
transactionHash: ethJSUtil.bufferToHex(new Buffer(tx.hash())) transactionHash: ethJSUtil.bufferToHex(new Buffer(tx.hash()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment