From 4e62f93253885da9581e3d78a2df3a87687f2fa4 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 15 Dec 2021 21:39:36 -0500 Subject: [PATCH] doc: add unhandledRejection to strict mode `lib/internal/process/promises.js` contains the following comment about --unhandled-rejections=strict. This commit updates the docs to reflect this: // --unhandled-rejections=strict: // Emit 'uncaughtException'. If it's not handled, print // the error to stderr and exit the process. // Otherwise, emit 'unhandledRejection'. If // 'unhandledRejection' is not // handled, emit 'UnhandledPromiseRejectionWarning'. Fixes: https://github.com/nodejs/node/issues/41184 --- doc/api/cli.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index a54cf6129e3bda..70a22ad50387fb 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1254,7 +1254,8 @@ occurs. One of the following modes can be chosen: * `throw`: Emit [`unhandledRejection`][]. If this hook is not set, raise the unhandled rejection as an uncaught exception. This is the default. -* `strict`: Raise the unhandled rejection as an uncaught exception. +* `strict`: Raise the unhandled rejection as an uncaught exception. If the + exception is handled, [`unhandledRejection`][] is emitted. * `warn`: Always trigger a warning, no matter if the [`unhandledRejection`][] hook is set or not but do not print the deprecation warning. * `warn-with-error-code`: Emit [`unhandledRejection`][]. If this hook is not