Skip to content
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

Should show error messages, not crash node.js #2

Closed
al6x opened this issue Apr 7, 2013 · 7 comments
Closed

Should show error messages, not crash node.js #2

al6x opened this issue Apr 7, 2013 · 7 comments

Comments

@al6x
Copy link

al6x commented Apr 7, 2013

Currently if there's syntax error in file node.js will crash with error messages in console.

Maybe it would be better (at least in development) to show error messages in console and in http request for js file, but not crash the server.

@ForbesLindesay
Copy link
Owner

It shouldn't crash (and doesn't for me). The correct behavior is to serve a 500 server error for the file, and log the actual error message to the console. How are you using it, and what output are you getting?

@ForbesLindesay
Copy link
Owner

Ah, it does now. It should be fixed by browserify/browserify#375 which leads to really nice syntax errors like:

C:\GitHub\browserify-middleware\example\client\syntax-error.js:1
foo(
    ^
ParseError: Unexpected end of input

ForbesLindesay added a commit that referenced this issue Apr 10, 2013
@al6x
Copy link
Author

al6x commented Apr 11, 2013

Thanks for your help and sorry for delay with providing details about the problem. I use node for my free-time projects and usually can work with it in on weekends only :).

@ForbesLindesay
Copy link
Owner

No worries, thanks for the initial report. Hopefully the fix will get merged soon. If not, it can be worked around.

ForbesLindesay added a commit that referenced this issue Apr 16, 2013
This needs to be removed once the PR in browserify is closed
@ForbesLindesay
Copy link
Owner

This is fixed in 1.7.1 I'd like to leave this issue open as a reminder to remove the hack once @substack merges the proper fix.

ForbesLindesay added a commit that referenced this issue Apr 22, 2013
@ForbesLindesay
Copy link
Owner

I'm still patching browserify/syntax-error#1 but browserify/browserify#375 is now merged so I'm closing this issue.

@al6x
Copy link
Author

al6x commented Apr 22, 2013

If there's an error in transformer (in my case coffeeify) it still crashes, and, what's worse there's no information about the problem - so it's very hard to locate problem, more details https://github.com/substack/coffeeify/pull/10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants