This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
core: Make errno message a part of errno exceptions #2695
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To people like me there don't use enough time with errno codes it can be difficult to remember what
EBADF
means. This add a text message to all errno exceptions, likebad file descriptor
.The messages are from
get_uv_errno_message
, to use this it was necessary to change theSetError
so it set errno to a number and notget_uv_errno_string
.I'm hoping we later could abstract
ErrnoException
fromnode.cc
to useErrno::ErrnoException
.It would also be nice to have binding functions return an
uv_errno
number instead of1
or0
. This way we won't polluteglobal
scope witherrno
.Example of this patch:
@piscisaureus told me that you did not want any
errno
changes now, but since I had made the patch why not allow you to reconsider.