This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Unexpected token SyntaxError doesn't trigger multi-line input anymore #8874
Comments
misterdjules
changed the title
SyntaxError doesn't trigger multi-line input anymore
Unexpected token SyntaxError doesn't trigger multi-line input anymore
Dec 15, 2014
misterdjules
pushed a commit
to misterdjules/node
that referenced
this issue
Dec 15, 2014
Fix the regexp used to detect 'Unexpected token' errors so that they can be considered as recoverable. This fixes the following use case: > var foo = 'bar \ ... baz'; undefined > foo 'bar baz' > Fixes nodejs#8874
Closed
misterdjules
pushed a commit
to misterdjules/node
that referenced
this issue
May 11, 2015
Fix the regexp used to detect 'Unexpected token' errors so that they can be considered as recoverable. This fixes the following use case: > var foo = 'bar \ ... baz'; undefined > foo 'bar baz' > Fixes nodejs#8874
Fixed by 101e103. |
Closed
misterdjules
pushed a commit
to nodejs/node
that referenced
this issue
Jun 25, 2015
Fix the regexp used to detect 'Unexpected token' errors so that they can be considered as recoverable. This fixes the following use case: > var foo = 'bar \ ... baz'; undefined > foo 'bar baz' > Fixes: nodejs/node-v0.x-archive#8874 PR-URL: nodejs/node-v0.x-archive#8875 PR-URL: #2052 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
mscdex
pushed a commit
to mscdex/io.js
that referenced
this issue
Jul 9, 2015
Fix the regexp used to detect 'Unexpected token' errors so that they can be considered as recoverable. This fixes the following use case: > var foo = 'bar \ ... baz'; undefined > foo 'bar baz' > Fixes: nodejs/node-v0.x-archive#8874 PR-URL: nodejs/node-v0.x-archive#8875 PR-URL: nodejs#2052 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
With node 0.10.x, it is possible to trigger multi-line input with an 'Unexpected token' syntax error:
I'm not sure this is a desirable feature, since it also triggers multi-line input on 'Unexpected token' syntax errors from which it seems impossible to recover:
However, the behavior is different with node 0.11.x. An 'Unexpected token' syntax error doesn't trigger multi-line input anymore, and instead the
SyntaxError
bubbles up:The original commit that broke this behavior is 9ef9a9d. It also seems that b517500 was an attempt to bring this back.
The text was updated successfully, but these errors were encountered: