-
Notifications
You must be signed in to change notification settings - Fork 73
Add error type (fixes #61) #62
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
Conversation
| internals.addMethod(word, method); | ||
| }); | ||
|
|
||
| internals.addMethod('error', function (/*type, message*/) { |
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 feel like there is some DRY that could be applied here.
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 logic and the error strings are slightly different, I can't see any re-use.
|
Can you add a test showing |
|
It should be OK now, the logic on the not was wrong, so good gatekeeping here ;) |
|
no api docs update 😢 |
|
Dammit ! I always forget that ! Sorry. |
|
Done as #64. |
|
@Marsup just published [email protected] |
|
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
Mostly ripoff of the throw code with small adjustments in the tests because I considered not passing a type should still check whether that's an error type or not, I'd argue the throw logic is wrong on this side.