-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
doc: errno is a number, not a string #9007
Conversation
Note: Since this documentation change is relevant to currently released versions of Node, it should probably be backported to relevant branches. |
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
return the same value. | ||
#### error.errno | ||
|
||
Returns a number representing the error code, which may be referenced in |
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.
Maybe Returns a number corresponding to an error code
? LGTM either way.
Also it's a small thing, but if you could wrap your commit message at 72 chars that'd be great. |
The documentation erroneously described the errno property as an alias for the code property, but that is not the case in the implementation. errno is the error code of the error as a number, and code is the error code of the error as a string.
@gibfahn I have clarified the documentation, and fixed the commit message. Please note that I have added extra information since the last commit. Node negates the error code, so an error code of |
The documentation erroneously described the errno property as an alias for the code property, but that is not the case in the implementation. errno is the error code of the error as a number, and code is the error code of the error as a string. PR-URL: nodejs#9007 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Landed in f478b46. |
The documentation erroneously described the errno property as an alias for the code property, but that is not the case in the implementation. errno is the error code of the error as a number, and code is the error code of the error as a string. PR-URL: #9007 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
The documentation erroneously described the errno property as an alias for the code property, but that is not the case in the implementation. errno is the error code of the error as a number, and code is the error code of the error as a string. PR-URL: #9007 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
The documentation erroneously described the errno property as an alias for the code property, but that is not the case in the implementation. errno is the error code of the error as a number, and code is the error code of the error as a string. PR-URL: #9007 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Checklist
Affected core subsystem(s)
doc
Description of change
The documentation erroneously described the errno property as an alias for the
code property, but that is not the case in the implementation. errno is the
error code of the error as a number, and code is the error code of the error
as a string.
As proof, here's some code:
Output: