promise-it-wont-hurt icon indicating copy to clipboard operation
promise-it-wont-hurt copied to clipboard

Support promise.catch in exercise Reject a promise

Open TylerYang opened this issue 7 years ago • 1 comments

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.

TylerYang avatar Dec 03 '17 14:12 TylerYang

Sure, a patch would be welcome.

TimothyGu avatar Dec 04 '17 03:12 TimothyGu