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

src: refactor uncaught exception handling #28257

Closed
wants to merge 2 commits into from

Commits on Jun 17, 2019

  1. src: refactor uncaught exception handling

    The C++ land `node::FatalException()` is not in fact fatal anymore.
    It gives the user a chance to handle the uncaught exception
    globally by listening to the `uncaughtException` event. This patch
    renames it to `TriggerUncaughtException` in C++ to avoid the confusion.
    
    In addition rename the JS land handler to `onGlobalUncaughtException`
    to reflect its purpose - we have to keep the alias
    `process._fatalException` and use that for now since it has been
    monkey-patchable in the user land.
    
    This patch also
    
    - Adds more comments to the global uncaught exception handling routine
    - Puts a few other C++ error handling functions into the `errors`
      namespace
    - Moves error-handling-related bindings to the `errors` binding.
    
    Refs: nodejs@2b252ac
    joyeecheung committed Jun 17, 2019
    Copy the full SHA
    b28a809 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    112373e View commit details
    Browse the repository at this point in the history