Skip to content

Commit 2bb7eb4

Browse files
authored
Merge pull request ethereumjs#408 from ethereumjs/fix-runcode-error
Fix error handling in runCode (in case loadContract fails)
2 parents 7169992 + 08079ee commit 2bb7eb4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/runCode.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ module.exports = function (opts, cb) {
107107
loadContract(runVm)
108108

109109
// iterate through the given ops until something breaks or we hit STOP
110-
function runVm () {
110+
function runVm (err) {
111+
if (err) {
112+
return parseVmResults(err)
113+
}
111114
async.whilst(vmIsActive, iterateVm, parseVmResults)
112115
}
113116

0 commit comments

Comments
 (0)