Skip to content

Commit 4d6163e

Browse files
cjihrigdanielleadams
authored andcommitted
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: #41184 PR-URL: #41194 Reviewed-By: Derek Lewis <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 43d64a0 commit 4d6163e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/api/cli.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,8 @@ occurs. One of the following modes can be chosen:
12251225

12261226
* `throw`: Emit [`unhandledRejection`][]. If this hook is not set, raise the
12271227
unhandled rejection as an uncaught exception. This is the default.
1228-
* `strict`: Raise the unhandled rejection as an uncaught exception.
1228+
* `strict`: Raise the unhandled rejection as an uncaught exception. If the
1229+
exception is handled, [`unhandledRejection`][] is emitted.
12291230
* `warn`: Always trigger a warning, no matter if the [`unhandledRejection`][]
12301231
hook is set or not but do not print the deprecation warning.
12311232
* `warn-with-error-code`: Emit [`unhandledRejection`][]. If this hook is not

0 commit comments

Comments
 (0)