mirror of https://github.com/nodejs/node.git
lib: remove manual exception handling in queueMicrotask
PR-URL: https://github.com/nodejs/node/pull/33859 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
8f000ea09f
commit
178e52a7ea
|
@ -15,10 +15,6 @@ const {
|
|||
enqueueMicrotask
|
||||
} = internalBinding('task_queue');
|
||||
|
||||
const {
|
||||
triggerUncaughtException
|
||||
} = internalBinding('errors');
|
||||
|
||||
const {
|
||||
setHasRejectionToWarn,
|
||||
hasRejectionToWarn,
|
||||
|
@ -151,10 +147,6 @@ function runMicrotask() {
|
|||
const callback = this.callback;
|
||||
try {
|
||||
callback();
|
||||
} catch (error) {
|
||||
// runInAsyncScope() swallows the error so we need to catch
|
||||
// it and handle it here.
|
||||
triggerUncaughtException(error, false /* fromPromise */);
|
||||
} finally {
|
||||
this.emitDestroy();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue