-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
require(): no information about where error #3784
Comments
you should be able to run |
@amurchick I believe this is specific to REPL. Can you please confirm if my understanding is correct? |
It is REPL specific. |
Looking into it a bit, the difference between On the other hand, towards the end of the regular load's flow The naive first thought will be to call Thoughts? |
@thefourtheye @cjihrig - it is NOT REPL specific. Try this:
|
Ah, sorry. Misunderstanding. I meant that the legacy behavior is there if you don't catch the error. For example, if you drop the I would like to work on this, I'm just trying to figure out what the best approach would be. Exposing I'm willing to do the work once it's decided how we want to do this. |
Is this possibly related to #2860? |
Currently, when a file with a syntax error is imported in the REPL, no information is provided on the error's location. This commit adds the error's location to the stack trace. Refs: nodejs#2762 Refs: nodejs#3411 Refs: nodejs#3784 PR-URL: nodejs#4013 Reviewed-By: Ben Noordhuis <[email protected]>
Currently, when a file with a syntax error is imported in the REPL, no information is provided on the error's location. This commit adds the error's location to the stack trace. Refs: #2762 Refs: #3411 Refs: #3784 PR-URL: #4013 Reviewed-By: Ben Noordhuis <[email protected]>
Currently, when a file with a syntax error is imported in the REPL, no information is provided on the error's location. This commit adds the error's location to the stack trace. Refs: nodejs#2762 Refs: nodejs#3411 Refs: nodejs#3784 PR-URL: nodejs#4013 Reviewed-By: Ben Noordhuis <[email protected]>
Currently, when a file with a syntax error is imported in the REPL, no information is provided on the error's location. This commit adds the error's location to the stack trace. Refs: #2762 Refs: #3411 Refs: #3784 PR-URL: #4013 Reviewed-By: Ben Noordhuis <[email protected]>
Working again in master and I believe 93afc39 is responsible for that. I'll close the issue. |
Issue still not fixed:
In REPL all ok:
|
@amurchick It's fixed in master and will be released as v6.0.0 later this month. |
Currently, when a file with a syntax error is imported in the REPL, no information is provided on the error's location. This commit adds the error's location to the stack trace. Refs: nodejs#2762 Refs: nodejs#3411 Refs: nodejs#3784 PR-URL: nodejs#4013 Reviewed-By: Ben Noordhuis <[email protected]>
I got the same problem with [email protected] |
@lichenhao please try with the v6 release line. This isn't going to be fixed in v4. |
When errors in
require()
'd file:I am understand - error in
auth.js
, but no info where error occurred was provided - files sometimes big and no quick way to localize error.Early - some useful diagnostics was provided:
The text was updated successfully, but these errors were encountered: