Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process: Add --unhandled-rejections=throw and =warn-with-error-code #33475

Closed

Commits on May 29, 2020

  1. process: Add --unhandled-rejections=throw and =warn-with-error-code

    This PR defines two new modes for the --unhandled-rejections flag.
    
    The first mode is called "throw". The "throw" mode first emits
    unhandledRejection. If this hook is not set, the "throw" mode will
    raise the unhandled rejection as an uncaught exception.
    
    The second mode is called "warn-with-error-code". The
    "warn-with-error-code" mode first emits unhandledRejection. If this
    hook is not set, the "warn-with-error-code" mode will trigger a
    warning and set the process's exit code to 1.
    
    The PR doesn't change the default behavior for unhandled rejections.
    That will come in a separate PR.
    
    Refs: nodejs#33021
    dfabulich committed May 29, 2020
    Configuration menu
    Copy the full SHA
    0494b5b View commit details
    Browse the repository at this point in the history