Skip to content

Implement ES stage-3 proposal: error-cause #38725

Description

@slorber

Is your feature request related to a problem? Please describe.

Wrapping/enhancing errors with more context is complicated in JavaScript, while it's supported in multiple languages (like Java)

Describe the solution you'd like

Implement this stage-3 error cause proposal: https://github.com/tc39/proposal-error-cause

It's also worth making sure that logging an error with a causal chain logs the full causal chain recursively by default: this would make it easier to find the root cause of a bug without requiring the user to loop over the causal chain.

@mcollina suggested to open an issue

Describe alternatives you've considered

Using a custom non-std error library, but this would only work in my own code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    errorsIssues and PRs related to JavaScript errors originating in Node.js core.feature requestIssues requesting new Node.js features.v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions