Keep REPL running on runtime errors

This commit is contained in:
Demian Ferreiro
2013-03-11 21:31:17 -03:00
parent 20d98c7106
commit 45bcd9fa2f
3 changed files with 10 additions and 4 deletions

View File

@@ -24,11 +24,11 @@
bare: true,
locals: Object.keys(context)
});
return cb(null, vm.runInContext(js, context, filename));
} catch (_error) {
err = _error;
console.log(prettyErrorMessage(err, filename, input, true));
return cb(prettyErrorMessage(err, filename, input, true));
}
return cb(null, vm.runInContext(js, context, filename));
}
};