Closed
Description
- Version: v15.12.0 (issue exists on main and has existed since v15.0.0)
- Platform:
Darwin dsg-mbp 18.7.0 Darwin Kernel Version 18.7.0: Tue Nov 10 00:07:31 PST 2020; root:xnu-4903.278.51~1/RELEASE_X86_64 x86_64
(but issue is not platform-specific) - Subsystem:
src/node_options.cc
What steps will reproduce the bug?
In #33475, @dfabulich added two new legal values for --unhandled-rejection
: throw
and warn-with-error-code
. These new values are not listed in the help string in node --help
. Additionally, the help string doesn't explain which is the default value.
$ node --version
v15.12.0
$ node --help | grep -A4 unhandled-rejections
--unhandled-rejections=... define unhandled rejections behavior.
Options are 'strict' (raise an error),
'warn' (enforce warnings) or 'none'
(silence warnings)
--use-bundled-ca use bundled CA store (default)
$ node --unhandled-rejections=an-unknown-value -e ''
node: invalid value for --unhandled-rejections
$ node --unhandled-rejections=throw -e ''
$ node --unhandled-rejections=warn-with-error-code -e ''
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior?
The documentation of --unhandled-rejections
in --help
should list all legal values or not attempt to provide a list of legal values, and it should say what the default value is.
What do you see instead?
Only strict, warn, and none, as shown above.
Additional information
I'd file a PR but I'm not sure I know how to describe the two new values in a concise way. (One option would be to remove the parenthesized explanations and just link to the docs for more details.)
Metadata
Metadata
Assignees
Labels
No labels