Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! doc: clarify uncaughtException origin for ESM
  • Loading branch information
aduh95 committed Dec 27, 2021
commit c3b26924c7287f95f769a70f6884f9b260733ffa
3 changes: 3 additions & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,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 happen in the ES module static loading phase, it will always raise
it as an uncaught exception.

### `--use-bundled-ca`, `--use-openssl-ca`

<!-- YAML
Expand Down
8 changes: 5 additions & 3 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ changes:
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, or when the entry point is an ES module.
an unhandled rejection, or when a rejection happens in the 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
Expand Down Expand Up @@ -435,7 +436,8 @@ added:
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, or when the entry point is an ES module.
an unhandled rejection, or when a rejection happens in the ES module static
loading phase.

The `'uncaughtExceptionMonitor'` event is emitted before an
`'uncaughtException'` event is emitted or a hook installed via
Expand Down Expand Up @@ -535,7 +537,7 @@ function SomeResource() {
}

const resource = new SomeResource();
// no await, .catch, or .then on resource.loaded for at least a turn
// No await, .catch, or .then on resource.loaded for at least a turn.
```

```cjs
Expand Down