-
Notifications
You must be signed in to change notification settings - Fork 30k
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
[v9.x] backport 17338, 18186, 18358, 18546 #18916
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nodejs-github-bot
added
lib / src
Issues and PRs related to general changes in the lib or src directory.
v9.x
labels
Feb 21, 2018
cc @MylesBorins |
MylesBorins
force-pushed
the
v9.x-staging
branch
from
February 21, 2018 23:13
b9b5810
to
6edf952
Compare
joyeecheung
force-pushed
the
backport-sys-errors
branch
from
February 22, 2018 11:09
2986698
to
d0a6d91
Compare
Add a errno -> [error code, uv error message] map to the uv binding so the error message can be assembled in the JS layer. PR-URL: nodejs#17338 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reimplement uv.errname() as internal/util.getSystemErrorName() to avoid the memory leaks caused by unknown error codes and avoid calling into C++ for the error names. Also expose it as a public API for external use. PR-URL: nodejs#18186 Refs: http://docs.libuv.org/en/v1.x/errors.html#c.uv_err_name Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
- Allow user to customize why the argument is invalid - Display the argument with util.inspect so null bytes can be displayed properly. PR-URL: nodejs#18358 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
PR-URL: nodejs#18546 Reviewed-By: James M Snell <jasnell@gmail.com>
This commit moves error creation helpers scattered around under lib/ into lib/internal/errors.js in the hope of being clearer about the differences of errors that we throw into the user land. - Move util._errnoException and util._exceptionWithHostPort into internal/errors.js and simplify their logic so it's clearer what the properties these helpers create. - Move the errnoException helper in dns.js to internal/errors.js into internal/errors.js and rename it to dnsException. Simplify it's logic so it no longer calls errnoException and skips the unnecessary argument checks. PR-URL: nodejs#18546 Reviewed-By: James M Snell <jasnell@gmail.com>
joyeecheung
force-pushed
the
backport-sys-errors
branch
from
February 22, 2018 11:10
d0a6d91
to
714c529
Compare
There was a force update in the base branch. Rebased and new CI: https://ci.nodejs.org/job/node-test-pull-request/13326/ |
URL: https://ci.nodejs.org/job/node-test-commit-linux/nodes=centos7-64/16611/console
Only a known flake on the CI.. |
By the way, #18186 here is semver-minor. |
addaleax
added
the
semver-minor
PRs that contain new features and should be released in the next minor version.
label
Feb 26, 2018
addaleax
force-pushed
the
v9.x-staging
branch
from
February 26, 2018 22:43
2177138
to
319cd44
Compare
MylesBorins
pushed a commit
that referenced
this pull request
Feb 26, 2018
Reimplement uv.errname() as internal/util.getSystemErrorName() to avoid the memory leaks caused by unknown error codes and avoid calling into C++ for the error names. Also expose it as a public API for external use. Backport-PR-URL: #18916 PR-URL: #18186 Refs: http://docs.libuv.org/en/v1.x/errors.html#c.uv_err_name Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins
pushed a commit
that referenced
this pull request
Feb 26, 2018
This commit moves error creation helpers scattered around under lib/ into lib/internal/errors.js in the hope of being clearer about the differences of errors that we throw into the user land. - Move util._errnoException and util._exceptionWithHostPort into internal/errors.js and simplify their logic so it's clearer what the properties these helpers create. - Move the errnoException helper in dns.js to internal/errors.js into internal/errors.js and rename it to dnsException. Simplify it's logic so it no longer calls errnoException and skips the unnecessary argument checks. Backport-PR-URL: #18916 PR-URL: #18546 Reviewed-By: James M Snell <jasnell@gmail.com>
landed in 562fdb5...19c46aa All failures in CI seem to be related to other flakes. |
MylesBorins
pushed a commit
that referenced
this pull request
Feb 26, 2018
Reimplement uv.errname() as internal/util.getSystemErrorName() to avoid the memory leaks caused by unknown error codes and avoid calling into C++ for the error names. Also expose it as a public API for external use. Backport-PR-URL: #18916 PR-URL: #18186 Refs: http://docs.libuv.org/en/v1.x/errors.html#c.uv_err_name Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins
pushed a commit
that referenced
this pull request
Feb 26, 2018
This commit moves error creation helpers scattered around under lib/ into lib/internal/errors.js in the hope of being clearer about the differences of errors that we throw into the user land. - Move util._errnoException and util._exceptionWithHostPort into internal/errors.js and simplify their logic so it's clearer what the properties these helpers create. - Move the errnoException helper in dns.js to internal/errors.js into internal/errors.js and rename it to dnsException. Simplify it's logic so it no longer calls errnoException and skips the unnecessary argument checks. Backport-PR-URL: #18916 PR-URL: #18546 Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
lib / src
Issues and PRs related to general changes in the lib or src directory.
semver-minor
PRs that contain new features and should be released in the next minor version.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Only two commits from #18546 are backported. The remaining one is related to the fs error migration and should be backported differently, if worth backporting at all.
src: expose uv.errmap to binding
Refs: #17338
util: implement util.getSystemErrorName()
Refs: #18186
errors: improve the description of ERR_INVALID_ARG_VALUE
Refs: #18358
util: skip type checks in internal getSystemErrorName
errors: move error creation helpers to errors.js
Refs: #18546