promise-it-wont-hurt
promise-it-wont-hurt copied to clipboard
Support promise.catch in exercise Reject a promise
In reject a promise
exercise, we didn't support promise.then
while catching the rejection. Check this link.
catch
and then(null, handleError)
are basically the same thing, and instead of doing promise.then(null, handleError)
, an experienced user would just use promise.catch(handleError)
. Like issue https://github.com/stevekane/promise-it-wont-hurt/issues/125.
I would like to send a pr if you think supporting promise.catch
in reject a promise is reasonable. Looking forward to your opinion.
Sure, a patch would be welcome.