FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

errors,_stream_wrap: change _stream_wrap.js to use internal/errors.js by LakshmiSwethaG · Pull Request #13291 · nodejs/node · GitHub

/ node Public

errors,_stream_wrap: change _stream_wrap.js to use internal/errors.js - #13291

Closed
LakshmiSwethaG wants to merge 1 commit into
nodejs:masterfrom
LakshmiSwethaG:stream-wrap-pr
Closed

errors,_stream_wrap: change _stream_wrap.js to use internal/errors.js#13291
LakshmiSwethaG wants to merge 1 commit into
nodejs:masterfrom
LakshmiSwethaG:stream-wrap-pr

Conversation

Copy link
Copy Markdown
Contributor

Refs: #11273

@jasnell, pinging you for mentoring as this is my first PR to this project, thank you!

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows [commit guidelines]
Affected core subsystem(s)

_stream_wrap.js

nodejs-github-bot added the stream Issues and PRs related to the stream subsystem. label May 30, 2017
Comment thread lib/_stream_wrap.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@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.

Comment thread lib/_stream_wrap.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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'));

mhdawson commented Jun 6, 2017

Copy link
Copy Markdown
Member

Unfortunately this needs a rebase.

Copy link
Copy Markdown
Contributor Author

Done the rebase and resolved the conflicts. Please review it. Thanks

Copy link
Copy Markdown
Member

tniessen self-assigned this Jun 17, 2017
tniessen added the errors Issues and PRs related to JavaScript errors originated in Node.js core. label Jun 17, 2017
tniessen pushed a commit that referenced this pull request Jun 20, 2017
PR-URL: #13291
Refs: #11273
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

Copy link
Copy Markdown
Member

Landed in d291338, thank you for your contribution! 🎉

tniessen closed this Jun 20, 2017
addaleax added the semver-major PRs that contain breaking changes and should be released in the next major version. label Jun 20, 2017

Copy link
Copy Markdown
Member

Labelled this semver-major as I think it should have been (not that there’s anything wrong with the patch), if I’m wrong feel free to remove the label.

Copy link
Copy Markdown
Member

@addaleax The error message did not change, why would this be semver-major?

Copy link
Copy Markdown
Member

@tniessen The error message changed from Error: Stream has StringDecoder to Error [ERR_STREAM_HAS_STRINGDECODER]: Stream has StringDecoder

Copy link
Copy Markdown
Member

@addaleax Right, my bad.

This file contains hidden or 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

errors Issues and PRs related to JavaScript errors originated in Node.js core. semver-major PRs that contain breaking changes and should be released in the next major version. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL