-
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
Tracking Issue: Migrate errors to internal/errors.js #11273
Comments
Am I wrong in thinking this could be a "good first contribution"? Would love to give it a try in that case. |
I think this could be a good first contribution in general, though some of the errors could be more complicated(the ones that are more frequently getting parsed in userland).
Probably |
@jasnell I've added links to those files, hope I am doing this right.. |
@fl0w ... yes, this can be a good first contribution. Please use my PR #11294 as a model. New error codes are added to Also please make sure that descriptions for the error codes are added to Really appreciate your willingness to jump in! Let me know if you have any questions or issues! |
@jasnell: can we modify the error messages of existing errors to more generic and reusable error messages? Or should the error message be completely backwards compatible? |
Modifying the error message is certainly possible. The biggest thing is to avoid duplicating error codes so make sure you check the other PRs for codes that may be reusable. |
Do we need to launch CITGM for all these semver-major PRs? cc @nodejs/build |
We should, yes. |
PR-URL: nodejs/node#14682 Refs: nodejs/node#11273 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
I just updated the list in the original post to reflect our current state. A couple of entries that were unchecked are now checked and a few that originally had PRs do not have PRs and still have to be ported. |
I am on "querystring.js" |
Here's a PR for lib/querystring.js: #15565 |
Covert lib/net.js over to using lib/internal/errors.js Ref: nodejs#11273 I have not addressed the cases that use errnoException(), for reasons described in nodejsGH-12926 - Replace thrown errors in lib/net.js with errors from lib/internal/errors. The ERR_INVALID_OPT_VALUE error have been used in the Server.prototype.listen() method after a discussion in Ref: nodejs#14782 - Update tests according to the above modifications
Covert lib/net.js over to using lib/internal/errors.js - Replace thrown errors in lib/net.js with errors from lib/internal/errors. The ERR_INVALID_OPT_VALUE error have been used in the Server.prototype.listen() method - Update tests according to the above modifications PR-URL: #14782 Refs: #11273 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Covert lib/net.js over to using lib/internal/errors.js - Replace thrown errors in lib/net.js with errors from lib/internal/errors. The ERR_INVALID_OPT_VALUE error have been used in the Server.prototype.listen() method - Update tests according to the above modifications PR-URL: nodejs/node#14782 Refs: nodejs/node#11273 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
`buffer.transcode` is still using raw TypeError. This change is to convert it to use internal/errors. Ref: nodejs#11273
`buffer.transcode` is still using raw TypeError. This change is to convert it to use internal/errors. Ref: #11273 PR-URL: #16352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
`buffer.transcode` is still using raw TypeError. This change is to convert it to use internal/errors. Ref: nodejs/node#11273 PR-URL: nodejs/node#16352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
`buffer.transcode` is still using raw TypeError. This change is to convert it to use internal/errors. Ref: nodejs/node#11273 PR-URL: nodejs/node#16352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
I am closing this as outdated. All regular JS errors got migrated but might need some more polishing here and there. There are a couple c++ errors that should be migrated but this was never tracked here. |
@BridgeAR There seems to be a few new old-style errors added in JS since this PR opened, searching |
I believe this issue is mostly done now except the punycode ones. I opened #27023 for that, so I am going to close this. Feel free to reopen if anyone thinks otherwise. |
Oops, did not realize it was closed. Sorry about the noise. |
Now that #11220 has landed, we need to begin the process of migrating errors in the
*/lib.js
source over to use it. A basic guide is provided here.Note that moving existing errors over to this mechanism should, in general, be considered
semver-major
.Please use the following list to track which files have been migrated over to using the new errors and provide a link back to this issue in the relevant PRs
_debug_agent.js(removed in 549e81bfa1)_debugger.js - debugger, errors: migrate to use internal/errors.js #11380(File removed from master)_linklist.jsstream
related (blocked)@refack: removed GFC label and commented out sentence in description + split off stream stuff
@BridgeAR: updated the list
The text was updated successfully, but these errors were encountered: