TritonDataCenter / node-verror

Rich JavaScript errors
MIT License
1.18k stars 61 forks source link

Compatibility with Error Cause proposal? #81

Closed voxpelli closed 2 years ago

voxpelli commented 3 years ago

A new proposal for a Error#cause is at stage 3 in TC39 and since this module also uses .cause for a very similar purpose this poses both an opportunity and a compatibility issue: https://github.com/tc39/proposal-error-cause

Not sure how to best handle this for VError, maybe a fully new version that polyfills and extends the standardized Error#cause?

voxpelli commented 2 years ago

I opted for the "fully new version" and released a module with a ponyfill and some VError-inspired helpers: https://github.com/voxpelli/pony-cause

Closing this as there has been no interest and that module answered this from my point of view.