Layerr
Errors, with.. layers..
A NodeJS and Web Error
wrapping utility, based heavily on VError, but without all the extras and dependencies on Node core utilities. Written in Typescript, compiled to JavaScript and suitable for bundling in the browser.
Installation
Install by running: npm install layerr
.
Usage
Use it as a regular error:
const Layerr = ; throw "Test error";
Or use it to wrap errors:
;
Layerr's can have info attached:
const Layerr = ; { throw info: code: 123 "Problem";} ;