-
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
errors: use ERR_OUT_OF_RANGE for index errors #22969
Conversation
Remove ERR_INDEX_OUT_OF_RANGE in favor of ERR_OUT_OF_RANGE which is capable of providing more detail. (In one instance, use ERR_BUFFER_OUT_OF_BOUNDS which is more accurate in that one instance.)
triggerAsyncId1, | ||
'Async resources having different causal ancestry ' + | ||
'should have different triggerAsyncIds'); | ||
triggerAsyncId1); |
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.
Nit: this should now fit on a single line.
Removed one of the three error message checks. It's for a message that originates in C++ and appears to vary based on OS. The error code and type are still checked. And there are still two other message checks. |
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
A few test-crypto-keygen failures. Known flaky with a fix being fast-tracked right now. Resume Build: https://ci.nodejs.org/job/node-test-pull-request/17347/ |
Windows fanned Resume Build: https://ci.nodejs.org/job/node-test-commit-windows-fanned/20904/ |
Windows Rebuild: https://ci.nodejs.org/job/node-test-commit-windows-fanned/20909/ ✔️ |
Landed in f8d6991 |
Remove ERR_INDEX_OUT_OF_RANGE in favor of ERR_OUT_OF_RANGE which is capable of providing more detail. (In one instance, use ERR_BUFFER_OUT_OF_BOUNDS which is more accurate in that one instance.) PR-URL: nodejs#22969 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Weijia Wang <[email protected]>
Remove ERR_INDEX_OUT_OF_RANGE in favor of ERR_OUT_OF_RANGE which is
capable of providing more detail. (In one instance, use
ERR_BUFFER_OUT_OF_BOUNDS which is more accurate in that one instance.)
Updated variable names to match documentation and error messages.
Updated some test cases to only check the error code and type and not the error message which should be subject to change.
h/t @apapirovski for help with troubleshooting C++ compilation errors because...yeah, that's not my strong suit
Labeling
semver-major
because error code changes are breaking changes. @nodejs/tscChecklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes