0.0.17 • Published 7 months ago
awesome-errors v0.0.17
!WARNING Awesome-errors is still being worked on. If you want to help, feel free to send a pull request or an issue.
awesome-errors
about
Awesome-errors is an error handling library built with readability in mind. It's written in typescript and works with Node.js only.
why to use it?
When it comes to error handling most of the time errors are hard to read and debug. With awesome-errors it shows only the most important content of a stack and a preview of where the stack was thrown, making it a lot easier to debug.
example
try {
throw new Error("something went wrong");
} catch (error) {
new AError(error);
}
[error]: something went wrong
--------------------------------------------------
=> file:///path/dist/main.js:28
27: try {
28: throw new Error("something went wrong");
29: }
installation
Just install it using npm: npm install awesome-errors
and import it: import AError from "awesome-errors"