@@ -335,9 +335,11 @@ changes:
335335* ` err ` {Error} The uncaught exception.
336336* ` origin ` {string} Indicates if the exception originates from an unhandled
337337 rejection or from an synchronous error. Can either be ` 'uncaughtException' ` or
338- ` 'unhandledRejection' ` . The latter is only used in conjunction with the
339- [ ` --unhandled-rejections ` ] [ ] flag set to ` strict ` or ` throw ` and
340- an unhandled rejection.
338+ ` 'unhandledRejection' ` . The latter is used when in an exception happens in a
339+ ` Promise ` based async context (or if a ` Promise ` is rejected) and
340+ [ ` --unhandled-rejections ` ] [ ] flag set to ` strict ` or ` throw ` (which is the
341+ default) and the rejection is not handled, or when a rejection happens during
342+ the command line entry point's ES module static loading phase.
341343
342344The ` 'uncaughtException' ` event is emitted when an uncaught JavaScript
343345exception bubbles all the way back to the event loop. By default, Node.js
@@ -431,9 +433,11 @@ added:
431433* ` err ` {Error} The uncaught exception.
432434* ` origin ` {string} Indicates if the exception originates from an unhandled
433435 rejection or from synchronous errors. Can either be ` 'uncaughtException' ` or
434- ` 'unhandledRejection' ` . The latter is only used in conjunction with the
435- [ ` --unhandled-rejections ` ] [ ] flag set to ` strict ` or ` throw ` and
436- an unhandled rejection.
436+ ` 'unhandledRejection' ` . The latter is used when in an exception happens in a
437+ ` Promise ` based async context (or if a ` Promise ` is rejected) and
438+ [ ` --unhandled-rejections ` ] [ ] flag set to ` strict ` or ` throw ` (which is the
439+ default) and the rejection is not handled, or when a rejection happens during
440+ the command line entry point's ES module static loading phase.
437441
438442The ` 'uncaughtExceptionMonitor' ` event is emitted before an
439443` 'uncaughtException' ` event is emitted or a hook installed via
0 commit comments