mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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:
committed by
Anna Henningsen
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user