-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
error miss filename and line number in 4.x and 5.x when require file compile error #7578
Comments
/cc @nodejs/lts Is this something that can be backported or are we pretty firm on not allowing any changes to error messages (especially in LTS)? |
Doubtful, is this coming directly from V8 so would mean patching V8? Can we narrow down the change that would need to be backported to assess the impact? |
Oh, no it's not from V8 is it, it's the bit with the filename isn't it? @mscdex do you know the commit here that changed this? |
Not offhand, no. |
bingo, thanks @evanlucas, we may be able to treat this as a bugfix. @nodejs/lts see #4874 and weigh in |
errors are always a tough one, as it could be viewed as a contract. Modifying the stack message in particular could break things in unexpected ways. Personally I'll defer to @jasnell on this one as I know he has pretty strong opinions regarding error messages. It may also be interesting to hear how various APM providers feel about this /cc @nodejs/diagnostics @watson @groundwater @Qard |
Yeah, while I recognize this is a bug fix, error messages are tricky things. I'm not that comfortable pulling this back. |
Fair enough, we have to be very conservative with v4. Thanks for the bug report @dead-horse but I don't think we can take this any further. |
@dead-horse I know that @jasnell was working on #6573 which has seemed to stall. This would potentially make it easier for us to make error messages extensible without requiring semver major bumps |
It's not so much stalled as it is pending. The ctc decision was to hold off
|
This comment has been minimized.
This comment has been minimized.
@manojkraftly No "fix my code for me" comment spam, please. Open an issue in nodejs/help, that's what it's for. |
@bnoordhuis I am not getting you, what you trying to explain me... |
@manojkraftly You are necroing an old bug report that's only superficially similar to your issue. Don't do that, open an issue here. |
when require a file within a syntax error, the error file name and line number won't set into
err.message
, but this is fixed in node 6. will we land this fix in node@4 ?in 4 and 5,
err.stack
will be:in 0.12 and 6,
err.stack
will be:The text was updated successfully, but these errors were encountered: