Hacker News new | past | comments | ask | show | jobs | submit login

async/await works best when all of your async code uses it, so it’s kind of silly to pass a callback into an async function like this example from the article that inspired catchify:

    async function asyncTask(cb) {
async functions return a promise that rejects if an error is thrown (either directly or by a promise that is awaited on), so there’s no need to handle every error if you’re ok with it just propagating.



Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: