Skip to content

Commit c5a157c

Browse files
committed
repl: fix repl after V8 upgrade
V8 improved the error message for illegal token in v8/v8@879b617b. This breaks the recoverable error handling in repl. PR-URL: nodejs#6482 Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
1 parent dfc9008 commit c5a157c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/repl.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,8 @@ function isRecoverableError(e, self) {
11681168

11691169
return message.startsWith('Unexpected end of input') ||
11701170
message.startsWith('Unexpected token') ||
1171-
message.startsWith('missing ) after argument list');
1171+
message.startsWith('missing ) after argument list') ||
1172+
message === 'Invalid or unexpected token';
11721173
}
11731174
return false;
11741175
}

0 commit comments

Comments
 (0)