From 3b7312d23af26d0c1bdcb977015bda7c4709f222 Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Mon, 1 Oct 2012 11:36:06 -0700 Subject: repl: make "end of input" JSON.parse() errors throw in the REPL --- lib/repl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/repl.js b/lib/repl.js index 6ebcdc1814..b10427a16f 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -275,7 +275,7 @@ function REPLServer(prompt, stream, eval_, useGlobal, ignoreUndefined) { !e.match(/^SyntaxError: Invalid regular expression/) && !e.match(/^SyntaxError: Invalid flags supplied to RegExp constructor/) && // JSON.parse() error - !(e.match(/^SyntaxError: Unexpected token .*\n/) && + !(e.match(/^SyntaxError: Unexpected (token .*|end of input)/) && e.match(/\n at Object.parse \(native\)\n/)); } -- cgit v1.2.1