Thrown
Generic Error handler
npm i thrown
Example
// logger function is optional// logger => internal logger // without options { try throw catch err } // with options : case 1 { try throw genericError'this is message' /* ... */ // or throw genericError'this is message' /* ... */ catch err } // with options : case 2 { try throw catch err errorHandlererr } // with options : case 3 { try throw genericError'this is message' /* ... */ catch err errorHandlererr }
API
try throw 'this is error' catch err // all options are optional errorHandler
License
MIT