errors,_stream_wrap: change _stream_wrap.js to use internal/errors.js#13291
errors,_stream_wrap: change _stream_wrap.js to use internal/errors.js#13291LakshmiSwethaG wants to merge 1 commit intonodejs:masterfrom LakshmiSwethaG:stream-wrap-pr
Conversation
lib/_stream_wrap.js
Outdated
There was a problem hiding this comment.
ERR_ASSERTION is the wrong code to use here. That should only be used with the assert module. I recommend creating a new code specific to this condition... perhaps ERR_STREAM_HAS_STRINGDECODER
There was a problem hiding this comment.
@jasnell , I followed your suggestions and made those changes.
In this process, I made few mistakes but I guess I recovered everything, please have a look.
Thanks.
lib/_stream_wrap.js
Outdated
There was a problem hiding this comment.
Just move the message to the internal/errors.js file where the code is declared, then simplify this to just:
self.emit('error', new errors.Error('ERR_STREAM_HAS_STRINGDECODER'));|
Unfortunately this needs a rebase. |
|
Done the rebase and resolved the conflicts. Please review it. Thanks |
|
Landed in d291338, thank you for your contribution! 🎉 |
|
Labelled this |
|
@addaleax The error message did not change, why would this be semver-major? |
|
@tniessen The error message changed from |
|
@addaleax Right, my bad. |
Refs: #11273
@jasnell, pinging you for mentoring as this is my first PR to this project, thank you!
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
_stream_wrap.js