ehmicky

ehmicky/set-error-class

Properly update an error's class.

JavaScript
4
1
MIT License

This package is a utility for safely changing an error's class (prototype, name, and constructor) in JavaScript/TypeScript, while updating its stack trace to reflect the new class name. It's designed for developers who need to transform or wrap errors dynamically, such as when re-throwing errors as different types or normalizing error hierarchies in libraries and applications.

Total donated
Undistributed
Share with your subscribers:

Recipients

How the donated funds are distributed

Support the dependencies of ehmicky/set-error-class

Account's avatar
Normalize exceptions/errors
Account's avatar
Automated development tasks for my own projects
Account's avatar
ESLint configuration for my own projects
Account's avatar
Prettier configuration for my own projects
Account's avatar
🤖 Repeat tests. Repeat tests. Repeat tests.

Support the repos that depend on ehmicky/set-error-class

Top contributors

ehmicky's profile
ehmicky
420 contributions
dependabot[bot]'s profile
dependabot[bot]
18 contributions

Recent events

Kivach works on the Obyte network, and therefore you can track all donations.

No events yet