4 ms·
The error handler won't be called until the next tick: Promise .reject('error') .catch(error => console.log('Error handler called:', error))
by fathyb 5y ago
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