Skip to content

Commit 352adcb

Browse files
BridgeARcodebytere
authored andcommitted
doc: outline when origin is set to unhandledRejection
The `uncaughtException` listener's origin argument was ambiguous about unhandled rejections. This should clarify when origin is set to `'unhandledRejection'`. Fixes: #32907 Signed-off-by: Ruben Bridgewater <[email protected]> PR-URL: #33530 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 94177da commit 352adcb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/api/process.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,9 @@ changes:
233233

234234
* `err` {Error} The uncaught exception.
235235
* `origin` {string} Indicates if the exception originates from an unhandled
236-
rejection or from synchronous errors. Can either be `'uncaughtException'` or
237-
`'unhandledRejection'`.
236+
rejection or from an synchronous error. Can either be `'uncaughtException'` or
237+
`'unhandledRejection'`. The latter is only used in conjunction with the
238+
[`--unhandled-rejections`][] flag set to `strict` and an unhandled rejection.
238239

239240
The `'uncaughtException'` event is emitted when an uncaught JavaScript
240241
exception bubbles all the way back to the event loop. By default, Node.js
@@ -2582,6 +2583,7 @@ cases:
25822583
[`'exit'`]: #process_event_exit
25832584
[`'message'`]: child_process.html#child_process_event_message
25842585
[`'uncaughtException'`]: #process_event_uncaughtexception
2586+
[`--unhandled-rejections`]: cli.html#cli_unhandled_rejections_mode
25852587
[`Buffer`]: buffer.html
25862588
[`ChildProcess.disconnect()`]: child_process.html#child_process_subprocess_disconnect
25872589
[`ChildProcess.send()`]: child_process.html#child_process_subprocess_send_message_sendhandle_options_callback

0 commit comments

Comments
 (0)