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

@@ -23,9 +23,9 @@ replDefaults =
new Assign (new Value new Literal '_'), ast, '='
]
js = ast.compile bare: yes, locals: Object.keys(context)
cb null, vm.runInContext(js, context, filename)
catch err
console.log prettyErrorMessage err, filename, input, yes
cb null, vm.runInContext(js, context, filename)
cb prettyErrorMessage(err, filename, input, yes)
addMultilineHandler = (repl) ->
{rli, inputStream, outputStream} = repl