-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d1e8eef
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.
Considering the original
which was entirely correct... 😁
d1e8eef
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.
I don't agree with that. What if they will introduce a new error code, or somebody returns an error code like that which has no connection with this EBADF?
d1e8eef
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.
@raszi Now, if they will ever introduce another error code, then it will necessarily fail as it cannot foresee the future. The same applies to "for somebody returning something...", yet, I guess people who monkey patch the fs will make sure that it will behave in exactly the same way.
d1e8eef
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.
BTW: the commit is rather hilarious: DIEBEEF 😁
d1e8eef
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.
While we are at it, why not simply test for
No need for the multiplication and also no need for testing against idempotency '==='.
d1e8eef
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.
FWIW, based on this discussion it may be better to ignore
errno
and usecode
which always has a string value. The sign and interpretation oferrno
values is not consistent nor well-defined in Node.