mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
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:
1 parent
62450d38a8
commit
52a988bfb8
2 files changed
+13
-6
No files matched your search
@@ -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
@@ -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
|
||||
|
||||
Reference in new issue
Block a user