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
Contributor

@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

lib/internal/socket_list.js Outdated
@@ -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'));

This comment has been minimized.

@jasnell

jasnell Feb 13, 2017
Member

Please use the naming pattern ERR_***

@bougarfaoui
Copy link
Contributor Author

@bougarfaoui bougarfaoui commented Feb 14, 2017

@jasnell requested changes are done.

@jasnell jasnell mentioned this pull request Feb 14, 2017
79 of 80 tasks complete
lib/internal/errors.js Outdated
@@ -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');

This comment has been minimized.

@jasnell

jasnell Feb 14, 2017
Member

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

LGTM with a nit

lib/internal/socket_list.js Outdated
@@ -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'));

This comment has been minimized.

@joyeecheung

joyeecheung Feb 14, 2017
Member

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

This comment has been minimized.

This comment has been minimized.

@bougarfaoui

bougarfaoui Feb 14, 2017
Author Contributor

not yet

@jasnell jasnell added the blocked label Apr 5, 2017
@refack refack force-pushed the nodejs:master branch to fbe946b Apr 14, 2017
@fhinkel
Copy link
Member

@fhinkel fhinkel commented May 23, 2017

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

@fhinkel fhinkel added the stalled label Jun 7, 2017
@fhinkel
Copy link
Member

@fhinkel 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
Member

@refack refack commented Jul 19, 2017

I'm following up

@refack refack reopened this Jul 19, 2017
@refack refack force-pushed the bougarfaoui:internal-errors-socket_list branch 2 times, most recently Jul 19, 2017
@refack refack force-pushed the bougarfaoui:internal-errors-socket_list branch Jul 19, 2017
@refack refack force-pushed the bougarfaoui:internal-errors-socket_list branch to 71cb153 Jul 19, 2017
@refack refack self-assigned this Jul 19, 2017
@refack
Copy link
Member

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

This comment has been minimized.

@Trott

Trott Jul 20, 2017
Member

Typo: replay -> reply

Micronit: got -> received

@Trott
Trott approved these changes Jul 20, 2017
Copy link
Member

@Trott Trott left a comment

If CI is green, LGTM once typo is corrected.

refack added 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
Member

@refack refack commented Jul 21, 2017

Landed in a03d8ce

@refack refack closed this Jul 21, 2017
@refack refack added this to Done in Error Codes Aug 20, 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
Projects
Error Codes
  
Done
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants
You can’t perform that action at this time.