Skip to content
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 socket_list : Migrate errors to internal/errors.js #11356

Closed

Conversation

bougarfaoui
Copy link

@bougarfaoui bougarfaoui commented Feb 13, 2017

  • Assign codes to errors reported by internal/socket_list.js

Ref: #11273

Semver-major because this updates specific error messages and converts errors over to use the new internal/errors.js mechanism.

cc @jasnell

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

errors, socket_list

@nodejs-github-bot nodejs-github-bot added errors Issues and PRs related to JavaScript errors originated in Node.js core. net Issues and PRs related to the net subsystem. labels Feb 13, 2017
@@ -22,7 +24,7 @@ SocketListSend.prototype._request = function(msg, cmd, callback) {

function onclose() {
self.slave.removeListener('internalMessage', onreply);
callback(new Error('Slave closed before reply'));
callback(new errors.Error('SLAVE_CLOSED_BEFORE_REPLY'));
Copy link
Member

Choose a reason for hiding this comment

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

Please use the naming pattern ERR_***

@bougarfaoui
Copy link
Author

@jasnell requested changes are done.

@@ -86,3 +86,4 @@ module.exports = exports = {
// Note: Please try to keep these in alphabetical order
E('ERR_ASSERTION', (msg) => msg);
// Add new errors from here...
E('ERR_SLAVE_CLOSED_BEFORE_REPLY','Slave closed before reply');
Copy link
Member

Choose a reason for hiding this comment

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

nit: running make lint should complain on this. There needs to be a single space after the comma before 'Slave...

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

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

LGTM with a nit

@@ -22,7 +24,7 @@ SocketListSend.prototype._request = function(msg, cmd, callback) {

function onclose() {
self.slave.removeListener('internalMessage', onreply);
callback(new Error('Slave closed before reply'));
callback(new errors.Error('ERR_SLAVE_CLOSED_BEFORE_REPLY'));
Copy link
Member

Choose a reason for hiding this comment

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

Are there other PR documenting this error code? Otherwise this needs a documentation.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

not yet

@jasnell jasnell added the semver-major PRs that contain breaking changes and should be released in the next major version. label Feb 14, 2017
@jasnell jasnell added the blocked PRs that are blocked by other issues or PRs. label Apr 5, 2017
@fhinkel
Copy link
Member

fhinkel commented May 23, 2017

@bougarfaoui Do you want to take a stab at addressing the comments? Thanks!

@fhinkel fhinkel added the stalled Issues and PRs that are stalled. label Jun 7, 2017
@fhinkel
Copy link
Member

fhinkel commented Jun 28, 2017

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.

@fhinkel fhinkel closed this Jun 28, 2017
@refack
Copy link
Contributor

refack commented Jul 19, 2017

I'm following up

@refack refack reopened this Jul 19, 2017
@refack refack force-pushed the internal-errors-socket_list branch 2 times, most recently from 7cc85e2 to 892ff1c Compare July 19, 2017 21:58
@refack refack force-pushed the internal-errors-socket_list branch from 892ff1c to e4f04f5 Compare July 19, 2017 22:02
@refack refack force-pushed the internal-errors-socket_list branch from e4f04f5 to 71cb153 Compare July 19, 2017 23:08
@refack refack removed blocked PRs that are blocked by other issues or PRs. stalled Issues and PRs that are stalled. labels Jul 19, 2017
@refack refack self-assigned this Jul 19, 2017
@refack
Copy link
Contributor

refack commented Jul 19, 2017

@joyeecheung @fhinkel PTAL ( @Trott ? )

@refack
Copy link
Contributor

refack commented Jul 19, 2017

<a id="ERR_CHILD_CLOSED_BEFORE_REPLY"></a>
### ERR_CHILD_CLOSED_BEFORE_REPLY

Used when a child process is closed before the parent got a replay.
Copy link
Member

Choose a reason for hiding this comment

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

Typo: replay -> reply

Micronit: got -> received

Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

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

If CI is green, LGTM once typo is corrected.

refack pushed a commit to refack/node that referenced this pull request Jul 21, 2017
PR-URL: nodejs#11356
Refs: nodejs#11273
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@refack
Copy link
Contributor

refack commented Jul 21, 2017

Landed in a03d8ce

@refack refack closed this Jul 21, 2017
@refack refack removed their assignment Oct 20, 2018
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. net Issues and PRs related to the net subsystem. semver-major PRs that contain breaking changes and should be released in the next major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants