Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ihrig <cjihrig@gmail.com>2021-12-19 18:29:06 +0300
committerGitHub <noreply@github.com>2021-12-19 18:29:06 +0300
commita33521bc51785cf5d3d6eb6b6ed20e5edee72f62 (patch)
tree0ad0573ad5cafd558dac5a5e6efba8a122b08eae /doc/api/cli.md
parent94d493896e8640c22a7be281665b36e5f67126ea (diff)
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 PR-URL: https://github.com/nodejs/node/pull/41194 Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/cli.md')
-rw-r--r--doc/api/cli.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/api/cli.md b/doc/api/cli.md
index a54cf6129e3..70a22ad5038 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