Skip to content

Commit b189d4d

Browse files
committed
src: document newer values for --unhandled-rejections flag
These values were added in v15.0.0 by #33475 but were not included in the `node --help` output. Also document which value is the default. Fixes #37896.
1 parent f00c243 commit b189d4d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/node_options.cc

+6-2
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,12 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
500500
&EnvironmentOptions::trace_warnings,
501501
kAllowedInEnvironment);
502502
AddOption("--unhandled-rejections",
503-
"define unhandled rejections behavior. Options are 'strict' (raise "
504-
"an error), 'warn' (enforce warnings) or 'none' (silence warnings)",
503+
"define unhandled rejections behavior. Options are 'strict' "
504+
"(always raise an error), 'throw' (raise an error unless "
505+
"'unhandledRejection' hook is set; this is the default), 'warn' "
506+
"(log a warning), 'none' (silence warnings), "
507+
"'warn-with-error-code' (log a warning and set exit code 1 unless "
508+
"'unhandledRejection' hook is set)",
505509
&EnvironmentOptions::unhandled_rejections,
506510
kAllowedInEnvironment);
507511
AddOption("--verify-base-objects",

0 commit comments

Comments
 (0)