Fehler, die in asynchrone Funktionen geworfen werden
const asyncOperation = err => {
try {
setTimeout(function() {
throw err; // will be dropped onto the event queue
// until the call stack is empty
// even if this takes longer than
// a second.
}, 1000);
} catch (e) {
console.log(e) // will not be called
}
}
asyncOperation('Inner error *!?"$%&#@"')
Antonio Sergio Muxagata