Unverified Commit 370873c5 authored by Joyee Cheung's avatar Joyee Cheung
Browse files

process: refactor unhandled rejection handling

- Use constants instead of a dictionary and add comments
  about the behavior of each mode.
- Use switch cases to handle the unhandled rejection modes.
- Rename the run time value of the CLI option from `state`
  to `unhandledRejectionsMode`.
- Return in the call site of `emitWarning` when
  `--unhandled-rejections=none` instead of inside
  the function.

PR-URL: https://github.com/nodejs/node/pull/28228


Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
parent 1432065e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment