-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How does this interact with Error causes? #1
Comments
Wow, I had no idea about this new ES feature! Thanks! I'll consider what to do now. |
@staltz Feel free to pick my brain as much as you want, here or on Discord 👍 |
Oh @voxpelli it seems like pony-cause doesn't cover a use case that's quite important for us: when an error doesn't have a See: console.log(
stackWithCauses(
new ErrorWithCause('bar', {cause: {name: 'TypeError', message: 'foo'}}),
),
);
while console.log(clarify('foo', 'bar'));
|
@staltz Good input! I have made an issue about adding that to |
Thanks! And what about the case |
@staltz The standard proposal doesn't specify anything around how Though Firefox prints it like this: And Node.js 16.14.0 and 17.3.0 shipped nodejs/node#41002, making it also printing the causes |
Eg. |
Good to know! Note to self, here's how Node.js 16.14.0 renders "string errors" and stackless errors:
My use case is most important in Node.js, so would it be okay to ask that pony-cause follow the Node.js style of rendering in the cases of string errors and stackless errors? |
@staltz That sounds like a good approach to it, I’ll try to make it happen soon 👍 |
Fixes #22 Related to: staltz/clarify-error#1 and nodejs/node#41002
@staltz What's your thoughts on this solution? voxpelli/pony-cause#23 |
Fixes #22 Related to: staltz/clarify-error#1 and nodejs/node#41002
Fixes #22 Related to: staltz/clarify-error#1 and nodejs/node#41002
Considering that error causes are now part of the JS standard, using that instead would be beneficial, no?
This is the approach eg I took with https://github.com/voxpelli/pony-cause
The text was updated successfully, but these errors were encountered: