diff --git a/lib/runCode.js b/lib/runCode.js index 396ffc0ba1..cf01126d75 100644 --- a/lib/runCode.js +++ b/lib/runCode.js @@ -107,7 +107,10 @@ module.exports = function (opts, cb) { loadContract(runVm) // iterate through the given ops until something breaks or we hit STOP - function runVm () { + function runVm (err) { + if (err) { + return parseVmResults(err) + } async.whilst(vmIsActive, iterateVm, parseVmResults) }