-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
doc: clarify uncaughtException origin for ESM
#41339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
df5db76
c3b2692
61eb69a
ffe2656
c8d2454
b589d69
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
| an unhandled rejection, or when a rejection happens during 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 | ||
|
|
@@ -365,6 +366,8 @@ setTimeout(() => { | |
| }, 500); | ||
|
|
||
| // Intentionally cause an exception, but don't catch it. | ||
| // Because the exception happens when evaluating an ES module, this is | ||
| // undistinguishable from a Promise rejection, and will be reported as such. | ||
| nonexistentFunc(); | ||
| console.log('This will not run.'); | ||
| ``` | ||
|
|
@@ -433,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. | ||
| an unhandled rejection, or when a rejection happens during the ES module | ||
| static loading phase. | ||
|
|
||
| The `'uncaughtExceptionMonitor'` event is emitted before an | ||
| `'uncaughtException'` event is emitted or a hook installed via | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.