-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
node 9 loses error call site information in Buffer.concat #16994
Comments
https://nodejs.org/api/errors.html#errors_err_invalid_arg_type |
(That said, I understand that the stack trace could be better.) |
Looks like we need to not predefine the error as it loses the stack trace information. Lines 450 to 452 in 1601a3c
Labeling as good first issue and happy to assist anyone that wants to fix. |
The relevant PR that made the shift from the old style (generating an error in call site) to the new one (precomputing error) is #13976 , which references the general migration #11273 The notes https://github.com/nodejs/node/blob/master/doc/guides/using-internal-errors.md don't give any comments on preserving error stack, so maybe this is intentional behavior? ping @jasnell @starkwang |
Definitely not intentional. I think it was just an oversight. The error format should remain but it should be generated in the call site. |
I'd like to fix it |
PR-URL: #17021 Fixes: #16994 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This results in an error. Using node 8.9.1, the error message clearly indicates that the problem is in the source:
In node 9.1.0, the error message appears to come from the core:
The text was updated successfully, but these errors were encountered: