Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Or better, Promise.reject


Both are useful, but I'd hesitate to call it better. What makes you say it is better?


It makes explicit that the intention that a promise should be rejected, as opposed to a throw where one might reasonably expect an exception of some sort.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: