Ferocious Error Handling in Node.JS
Welcome to ferro
, a module that wants to improve the error handling experience in your Node.JS application.
It's work in progress, but you can already use it:
; // Optional; if you want support for JSON error traces. var ferro = ; // Simple usage: console; // "[MyError: Oups!]"console; // trueconsole; // trueconsole; // ... look for yourself :-) // Use native error objects: console;console; // Still works! // Atrribute your errors with extra information: console; // Hoist errors, giving them a new name: var databaseError = ;console; // Layering errors using the `cause` property: var networkError = ;console; // Advanced usage: { ;} // Serve errors as JSON response over HTTP: ; console;// Try creating `file.txt`, remove it again. Create a dir `file.txt`, ...
Want it?
It is as simple as npm install ferro