-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
src,lib: introduce util.getSystemErrorMessage(err)
#54075
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #54075 +/- ##
==========================================
- Coverage 88.41% 88.40% -0.01%
==========================================
Files 653 653
Lines 187485 187513 +28
Branches 36095 36100 +5
==========================================
+ Hits 165764 165774 +10
- Misses 14966 14977 +11
- Partials 6755 6762 +7
|
int err; | ||
if (!args[0]->Int32Value(env->context()).To(&err)) return; | ||
CHECK_LT(err, 0); | ||
char message[50]; |
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 50? Can you add 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.
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.
Can you add a comment?
* @returns {string} | ||
*/ | ||
function getSystemErrorMessage(err) { | ||
validateNumber(err, 'err'); |
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 do we need to call validateNumber since in the next line we check for SafeNumber?
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.
Same as name getter
This more about the current codebase.
cf6d059
to
972c30e
Compare
972c30e
to
3eac60e
Compare
This patch adds a new utility function which provides human-readable string description of the given system error code. Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
3eac60e
to
f42721b
Compare
Ping to @nodejs/libuv |
Landed in 61e52c8 |
This patch adds a new utility function which provides human-readable string description of the given system error code. Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com> PR-URL: #54075 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This patch adds a new utility function which provides human-readable string description of the given system error code. Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com> PR-URL: nodejs#54075 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This patch adds a new utility function which provides human-readable string description of the given system error code.