From 1390574d66c1be8da899d18fe09afc5cc568fb79 Mon Sep 17 00:00:00 2001 From: Matthieu Larcher Date: Tue, 22 Sep 2020 14:43:32 +0200 Subject: [PATCH] doc: outline when origin is set to unhandledRejection PR-URL: https://github.com/nodejs/node/pull/35294 Reviewed-By: Richard Lau Reviewed-By: Ruben Bridgewater Reviewed-By: Denys Otrishko Reviewed-By: Michael Dawson Reviewed-By: Rich Trott --- doc/api/process.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/api/process.md b/doc/api/process.md index fa60731a0aa45a..45c15a6771cb32 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -237,7 +237,8 @@ changes: * `origin` {string} Indicates if the exception originates from an unhandled 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. + [`--unhandled-rejections`][] flag set to `strict` or `throw` 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 @@ -308,7 +309,9 @@ added: * `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'`. + `'unhandledRejection'`. The latter is only used in conjunction with the + [`--unhandled-rejections`][] flag set to `strict` or `throw` and + an unhandled rejection. The `'uncaughtExceptionMonitor'` event is emitted before an `'uncaughtException'` event is emitted or a hook installed via