diff options
author | Nathan Rajlich <nathan@tootallnate.net> | 2012-10-01 11:36:06 -0700 |
---|---|---|
committer | Nathan Rajlich <nathan@tootallnate.net> | 2012-10-01 11:36:06 -0700 |
commit | 3b7312d23af26d0c1bdcb977015bda7c4709f222 (patch) | |
tree | c0e3e9127a43f3da12ce1134d4d71a8cffa7c4b7 /lib | |
parent | f1722a280c0b0505ecb2cd92cd66195a6d53368a (diff) | |
download | node-new-3b7312d23af26d0c1bdcb977015bda7c4709f222.tar.gz |
repl: make "end of input" JSON.parse() errors throw in the REPL
Diffstat (limited to 'lib')
-rw-r--r-- | lib/repl.js | 2 |
1 files changed, 1 insertions, 1 deletions
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/)); } |