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 documents which value is the default.

PR-URL: https://github.com/nodejs/node/pull/37899
Fixes: https://github.com/nodejs/node/issues/37896
Refs: https://github.com/nodejs/node/issues/33475
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
David Glasser 2021-03-24 16:07:26 -07:00 committed by Antoine du Hamel
parent fcc934f3d0
commit ce6d756298

View File

@ -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",