Skip to content

Commit

Permalink
doc: outline when origin is set to unhandledRejection
Browse files Browse the repository at this point in the history
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 <ruben@bridgewater.de>

PR-URL: #33530
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
BridgeAR authored and codebytere committed Jul 8, 2020
1 parent a9c5b33 commit 5436057
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,9 @@ changes:

* `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'`.
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` and an unhandled rejection.

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 @@ -2535,6 +2536,7 @@ cases:
[`'exit'`]: #process_event_exit
[`'message'`]: child_process.html#child_process_event_message
[`'uncaughtException'`]: #process_event_uncaughtexception
[`--unhandled-rejections`]: cli.html#cli_unhandled_rejections_mode
[`Buffer`]: buffer.html
[`ChildProcess.disconnect()`]: child_process.html#child_process_subprocess_disconnect
[`ChildProcess.send()`]: child_process.html#child_process_subprocess_send_message_sendhandle_options_callback
Expand Down

0 comments on commit 5436057

Please sign in to comment.