Skip to content

Commit 5436057

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 a9c5b33 commit 5436057

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
@@ -231,8 +231,9 @@ changes:
231231

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

237238
The `'uncaughtException'` event is emitted when an uncaught JavaScript
238239
exception bubbles all the way back to the event loop. By default, Node.js
@@ -2535,6 +2536,7 @@ cases:
25352536
[`'exit'`]: #process_event_exit
25362537
[`'message'`]: child_process.html#child_process_event_message
25372538
[`'uncaughtException'`]: #process_event_uncaughtexception
2539+
[`--unhandled-rejections`]: cli.html#cli_unhandled_rejections_mode
25382540
[`Buffer`]: buffer.html
25392541
[`ChildProcess.disconnect()`]: child_process.html#child_process_subprocess_disconnect
25402542
[`ChildProcess.send()`]: child_process.html#child_process_subprocess_send_message_sendhandle_options_callback

0 commit comments

Comments
 (0)