-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Shell treats SyntaxError thrown by user code as an unfinished command #8290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hmm, In attempting to reproduce, I'm dropped to the |
You're right. I must not have tried this. So there's an easy recovery. The behavior is still confusing; I originally hit this with a longer command and was looking for the missing closing delimiter for a minute or two. |
Yeah, the
It could be getting caught ( |
Can this be fixed with an update to the |
I had reason to believe it was a client-side fix, but I hadn't got the chance to investigate/debug. @mattmccutchen If you get a chance to look into this, please let us know! Happy to help in the debugging process if you need assistance! |
This turned out to be an easy server-side fix: #8446. |
Apply the check for a SyntaxError indicating an incomplete command only to the ECMAScript translation and parsing of a command and not to the execution, following the example of Node's defaultEval function. Fixes meteor#8290.
Apply the check for a SyntaxError indicating an incomplete command only to the ECMAScript translation and parsing of a command and not to the execution, following the example of Node's defaultEval function. Fixes #8290.
This should be fixed in Meteor 1.4.3.2. You can try the latest 1.4.3.2 beta and help confirm by running:
Please report back if you encounter any problems, and thanks for reporting and taking care of this! |
When checking for a SyntaxError that indicates an unfinished command, the shell does not distinguish between SyntaxErrors from parsing the command and SyntaxErrors thrown by user code during the execution. Example:
In another terminal:
Once this happens, typically the only way to recover is to interrupt and restart the shell.This happened when I was debugging my application and was pretty confusing until I added a catch block to the shell command. (Of course, theJSON.parse("[")
was happening inside a lot of other code.)The text was updated successfully, but these errors were encountered: