You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
process: Throw exception on --unhandled-rejections=default
This is a semver-major change that resolves DEP0018.
This PR defines a new mode for the --unhandled-rejections flag, called
"default". The "default" mode first emits unhandledRejection. If this
hook is not set, the "default" mode will raise the unhandled rejection
as an uncaught exception.
This mirrors the behavior of the current (unnamed) default mode for
--unhandled-rejections, which behaves nearly like "warn" mode. The
current default behavior is to emit unhandledRejection; if this hook is
not set, the unnamed default mode logs a warning and a deprecation
notice. (In comparison, "warn" mode always logs a warning, regardless of
whether the hook is set.)
All users that have set an unhandledRejection hook or set a non-default
value for the --unhandled-rejections flag will see no change in behavior
after this change.
Fixes: #20392
Refs: https://nodejs.org/dist/latest/docs/api/deprecations.html#deprecations_dep0018_unhandled_promise_rejections
Copy file name to clipboardExpand all lines: test/message/unhandled_promise_trace_warnings.out
-4Lines changed: 0 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,6 @@
17
17
at *
18
18
at *
19
19
at *
20
-
(node:*) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
21
-
at *
22
-
at *
23
-
at *
24
20
(node:*) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
25
21
at handledRejection (internal/process/promises.js:*)
26
22
at promiseRejectHandler (internal/process/promises.js:*)
0 commit comments