Skip to content

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

Closed
@slorber

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    errorsIssues and PRs related to JavaScript errors originated in Node.js core.feature requestIssues that request new features to be added to Node.js.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