Skip to content

implement process.exitWithException() #34051

Closed
@jasnell

Description

@jasnell

In the stalled PR #25715, @Fishrock123 was working to introduce a new API... from the original description:

Adds a public way to access node::FatalException from javascript, as process.exitWithException().

If an error stack is available on the value, this method of exiting does not add additional context, unlike regular re-throwing, yet also uses the regular error printing logic. This behavior is particularly desirable when doing 'fatal exits' from the unhandledRejection event.

While the PR had plenty of support to move forward, there was an edge case around the uncaughtException event handler that would need to be worked through in order for it to move forward.

The original PR stalled out and has been closed, but given the support the idea had, I wanted to make sure to open a Feature Request issue in case someone else wanted to pick up the work and move it forward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.processIssues and PRs related to the process subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions