doc: clarify uncaughtException origin for ESM

Fixes: https://github.com/nodejs/node/issues/41328

PR-URL: https://github.com/nodejs/node/pull/41339
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
This commit is contained in:
Antoine du Hamel authored and Danielle Adams committed 2022-01-31 23:54:50 -05:00
1 parent 62450d38a8
commit 52a988bfb8
2 files changed
+13 -6

No files matched your search

+3
View File
@@ -1232,6 +1232,9 @@ occurs. One of the following modes can be chosen:
set, trigger a warning, and set the process exit code to 1.
* `none`: Silence all warnings.
If a rejection happens during the command line entry point's ES module static
loading phase, it will always raise it as an uncaught exception.
### `--use-bundled-ca`, `--use-openssl-ca`
<!-- YAML
+10 -6
View File
@@ -335,9 +335,11 @@ changes:
* `err` {Error} The uncaught exception.
* `origin` {string} Indicates if the exception originates from an unhandled
rejection or from an synchronous error. Can either be `'uncaughtException'` or
`'unhandledRejection'`. The latter is only used in conjunction with the
[`--unhandled-rejections`][] flag set to `strict` or `throw` and
an unhandled rejection.
`'unhandledRejection'`. The latter is used when in an exception happens in a
`Promise` based async context (or if a `Promise` is rejected) and
[`--unhandled-rejections`][] flag set to `strict` or `throw` (which is the
default) and the rejection is not handled, or when a rejection happens during
the command line entry point's ES module static loading phase.
The `'uncaughtException'` event is emitted when an uncaught JavaScript
exception bubbles all the way back to the event loop. By default, Node.js
@@ -431,9 +433,11 @@ added:
* `err` {Error} The uncaught exception.
* `origin` {string} Indicates if the exception originates from an unhandled
rejection or from synchronous errors. Can either be `'uncaughtException'` or
`'unhandledRejection'`. The latter is only used in conjunction with the
[`--unhandled-rejections`][] flag set to `strict` or `throw` and
an unhandled rejection.
`'unhandledRejection'`. The latter is used when in an exception happens in a
`Promise` based async context (or if a `Promise` is rejected) and
[`--unhandled-rejections`][] flag set to `strict` or `throw` (which is the
default) and the rejection is not handled, or when a rejection happens during
the command line entry point's ES module static loading phase.
The `'uncaughtExceptionMonitor'` event is emitted before an
`'uncaughtException'` event is emitted or a hook installed via