Skip to content

Commit 08079ee

Browse files
axicholgerd77
authored andcommitted
Fix error handling in runCode (in case loadContract fails)
1 parent 7169992 commit 08079ee

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/runCode.js

Lines changed: 4 additions & 1 deletion
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)