-
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
inspector: migrate to internal/errors #15619
Conversation
Ping @nodejs/tsc |
lib/inspector.js
Outdated
throw new TypeError( | ||
`"params" must be an object, got ${typeof params} instead`); | ||
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', | ||
'params', 'Object', params); |
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.
Other errors mainly use 'object'
(lower cased).
Do we not have any tests for the inspector error cases? |
@BridgeAR ... none that were affected... which is a bit scary. |
@jasnell would you be so kind and add some for those? I think it would be a shame not to use the opportunity otherwise. |
Sure :-) gimme a couple of days tho. |
6aac4f2
to
81cf213
Compare
Test added! |
6c1c982
to
5bf3c97
Compare
5bf3c97
to
3498510
Compare
Ping @nodejs/tsc ... review please? |
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, Thanks!
lib/internal/errors.js
Outdated
@@ -236,6 +236,10 @@ E('ERR_HTTP_INVALID_STATUS_CODE', | |||
E('ERR_HTTP_TRAILER_INVALID', | |||
'Trailers are invalid with this transfer encoding'); | |||
E('ERR_INDEX_OUT_OF_RANGE', 'Index out of range'); | |||
E('ERR_INSPECTOR_ALREADY_CONNECTED', 'Already connected'); |
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: The inspector is already connected
?
PR-URL: #15619 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Landed in 4cf56ad |
PR-URL: nodejs/node#15619 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
migrate to internal/errors
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
inspector,errors