-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
errors: provide defaults for unmapped uv errors #29288
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but note there's another lazyErrmapGet()
in lib/internal/util.js
because of course there is.
That one handles missing entries by returning Unknown system error ${err}
. That's arguably a little nicer for debugging.
That one is gone, as of #29285.
I've updated the PR so that |
libuv does not map 100% of errors. When an unmapped error is encountered, the Map returns undefined, which is then unsuccessfully destructured, causing an exception. This commit adds a default value in the event of an unmapped error.
CI: https://ci.nodejs.org/job/node-test-pull-request/25268/ EDIT: CI was yellow. |
Landed in c246f81 |
libuv does not map 100% of errors. When an unmapped error is encountered, the Map returns undefined, which is then unsuccessfully destructured, causing an exception. This commit adds a default value in the event of an unmapped error. PR-URL: #29288 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
libuv does not map 100% of errors. When an unmapped error is encountered, the Map returns undefined, which is then unsuccessfully destructured, causing an exception. This commit adds a default value in the event of an unmapped error. PR-URL: #29288 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
libuv does not map 100% of errors. When an unmapped error is encountered, the Map returns undefined, which is then unsuccessfully destructured, causing an exception. This commit adds a default value in the event of an unmapped error. PR-URL: #29288 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
libuv does not map 100% of errors. When an unmapped error is encountered, the
Map
returnsundefined
, which is then unsuccessfully destructured, causing an exception. This commit adds a default value in the event of an unmapped error.A test will be added once #29285 lands.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes