News for hackers. Stuff that matters.
Re:Code optimizations when using async/await by fathyb on Tuesday January 04, 2022 @11:52AM (#29796875)
The error handler won't be called until the next tick:

    Promise
      .reject('error')
      .catch(error => console.log('Error handler called:', error))
    console.log('After reject')
This will print:

    After reject
    Error handler called: error

There are no comments on this comment yet.