AriaMinaei / AriaMinaei/pretty-error
Support nesting with cause
- Dominant language
- CoffeeScript
- Stars
- 1.5k
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Description
I'm building an application which really needs nested errors. The fs can throw, but in my application just seeing what failed isn't enough to understand what action was being attempted when a failure occurred. Instead I must catch the source error, attach some additional context, and rethrow.
I'd like to be able to attach the original error as a `cause`. Spec-level support for this is [already underway](https://github.com/tc39/proposal-error-cause/issues/2). A [shim](https://www.npmjs.com/package/error-cause) has been published as well, but while it can get a `cause` property set up correctly, it doesn't contain any logic about rendering causes. This library has an opportunity to be the first to present such information in a useful way and kickstart the community's ability to use this feature.
I'm going to make a fork and see what I can do.
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no files, tests, or entry points. Start by reviewing how pretty-error currently renders errors and compare the requested cause behavior with the linked TC39 proposal and shim. Done means nested causes are rendered with useful context while preserving the original error information.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- coffeescript, node.js
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100