-
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: port internal/buffer errors to internal/errors #11341
Conversation
lib/internal/buffer.js
Outdated
@@ -24,7 +26,7 @@ exports.transcode = function transcode(source, fromEncoding, toEncoding) { | |||
return result; | |||
|
|||
const code = icu.icuErrName(result); | |||
const err = new Error(`Unable to transcode Buffer [${code}]`); | |||
const err = new errors.Error('ERR_UNABlE_TRNSC_BUFF', code); |
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.
type in the code...
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.
Also, it would be better to fully spell out transcode and buffer
@jasnell what do you mean by 'type in code...' |
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.
This should break test-icu-transcode.js, the test needs to be updated.
I'm closing this because it's been inactive for quite a while. Feel free to reopen or ping a collaborator to get it reopened if needed. |
Ref: #11273
cc @jasnell
Semver-major because this updates specific error messages and converts errors over to use the new internal/errors.js mechanism.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
errors, buffer