Skip to content

Commit

Permalink
src: document newer values for --unhandled-rejections flag
Browse files Browse the repository at this point in the history
These values were added in v15.0.0 by nodejs#33475 but were not included in the
`node --help` output.

Also document which value is the default.

Fixes nodejs#37896.
  • Loading branch information
glasser committed Mar 25, 2021
1 parent f00c243 commit ef5f429
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/node_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,12 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
&EnvironmentOptions::trace_warnings,
kAllowedInEnvironment);
AddOption("--unhandled-rejections",
"define unhandled rejections behavior. Options are 'strict' (raise "
"an error), 'warn' (enforce warnings) or 'none' (silence warnings)",
"define unhandled rejections behavior. Options are 'strict' "
"(always raise an error), 'throw' (raise an error unless "
"'unhandledRejection' hook is set), 'warn' (log a warning), 'none' "
"(silence warnings), 'warn-with-error-code' (log a warning and set "
"exit code 1 unless 'unhandledRejection' hook is set). (default: "
"throw)",
&EnvironmentOptions::unhandled_rejections,
kAllowedInEnvironment);
AddOption("--verify-base-objects",
Expand Down

0 comments on commit ef5f429

Please sign in to comment.