-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
Closed
Labels
errorsIssues and PRs related to JavaScript errors originated in Node.js core.Issues and PRs related to JavaScript errors originated in Node.js core.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.
Description
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.
legendecas and kirillgroshkov
Metadata
Metadata
Assignees
Labels
errorsIssues and PRs related to JavaScript errors originated in Node.js core.Issues and PRs related to JavaScript errors originated in Node.js core.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.