Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
errors: assign error code to bootstrap_node created error#11298
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
Fishrock123 commented Feb 10, 2017
This is perhaps misleading as these are not necessarily "native" as in "C/C++" modules. |
jasnell commented Feb 10, 2017
Yep. It certainly is. Basing this off the existing wording (I did not change the error message at all). Do you have a suggestion for an alternative? |
doc/api/errors.md Outdated
joyeecheungFeb 10, 2017 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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.
We probably need a section explaining the new error system(like the section on "system errors" above mentioning those would have error.code, error. errno and error. syscall properties, then list the error codes). Going straight to error code descriptions seems pretty confusing if people read it from the top to the bottom...
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.
Yep, I agree. I was thinking of doing that in a separate PR
joyeecheung commented Feb 11, 2017
@jasnell@Fishrock123 do we have a name for the |
joyeecheung commented Feb 11, 2017
LGTM with the naming sorted out |
jasnell commented Feb 11, 2017
@joyeecheung ... not really with regards to naming. Perhaps |
joyeecheung commented Feb 12, 2017
Sorry, I wasn't being clear. I meant I am fine with I do think |
doc/api/errors.md Outdated
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.
Why don't we let the tools to generate the id for all these? It would be consistent that way.
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.
Because these anchors need to be consistent and predictable even if the structure of the document changes. Doing it this way ensures that the anchors will not change.
lib/internal/errors.js Outdated
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.
Now that the error message is updated to No such built-in module, the error code should be changed accordingly?
dcdda51 to 40637deComparejasnell commented Feb 14, 2017
Updated. PTAL |
jasnell commented Mar 22, 2017
Ping @nodejs/ctc ... can I get a review on this? |
jasnell commented Mar 22, 2017
mhdawson left a comment
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.
LGTM
jasnell commented Apr 20, 2017
This is no longer blocked. PR updated. |
Fishrock123 commented Apr 20, 2017 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
I think this is a misnomer, IIRC that module does not need to be built-in to possibly hit this path? (Don't all native modules hit this or something?) Note: I understand it is called "NativeModule as in "builtin natives". |
jasnell commented Apr 20, 2017
Not that I'm aware of. In every condition that I was able to find, most users will only see the "Cannot find module" error. This appears to be hit only in very specific cases involving the built-in modules. I could be wrong, but that's what I've been able to see. There's aren't even any test cases that I can see that trigger/test this. |
joyeecheung commented Apr 21, 2017
@jasnell FWIW, I have only ever hit this path when I accidentally deleted a js file from node.gyp... |
lib/internal/bootstrap_node.js Outdated
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.
Nit: There is a colon in errors.js file
jasnell commented Apr 21, 2017
jasnell commented Apr 21, 2017
@Fishrock123 ... are you satisfied with this? |
targos left a comment
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.
LGTM with a nit
lib/internal/bootstrap_node.js Outdated
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.
nit: there should be a space now that 7b4a72d has landed.
This does not use the internal/errors.js module because the error in question may actually be *caused* by an attempt to load internal/errors.js. This error should only be encountered in the case of a bug within Node.js itself. Ref: nodejs#11273
This does not use the internal/errors.js module because the error in question may actually be *caused* by an attempt to load internal/errors.js. This error should only be encountered in the case of a bug within Node.js itself. PR-URL: #11298 Ref: #11273 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
jasnell commented Apr 24, 2017
Landed in 251e5ed |
Fishrock123 commented Apr 24, 2017
Hmm, ok sounds good to me. Belated LGTM. |
This does not use the internal/errors.js module because the error in question may actually be caused by an attempt to load internal/errors.js. This error should only be encountered in the case of a bug within Node.js itself.
Ref: #11273
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
errors, src