aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNathan Rajlich <nathan@tootallnate.net>2012-10-01 11:36:06 -0700
committerNathan Rajlich <nathan@tootallnate.net>2012-10-01 11:36:06 -0700
commit3b7312d23af26d0c1bdcb977015bda7c4709f222 (patch)
treec0e3e9127a43f3da12ce1134d4d71a8cffa7c4b7 /lib
parentf1722a280c0b0505ecb2cd92cd66195a6d53368a (diff)
downloadandroid-node-v8-3b7312d23af26d0c1bdcb977015bda7c4709f222.tar.gz
android-node-v8-3b7312d23af26d0c1bdcb977015bda7c4709f222.tar.bz2
android-node-v8-3b7312d23af26d0c1bdcb977015bda7c4709f222.zip
repl: make "end of input" JSON.parse() errors throw in the REPL
Diffstat (limited to 'lib')
-rw-r--r--lib/repl.js2
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/));
}