chained-error
Zero dependencies error that allows creating a chain of errors, preserving the original cause (with TypeScript support)
Install
Install with npm:
$ npm install --save chained-error
Basic usage
; // ...try // ... catch error throw 'My message' error;
Later, when you catch the error, and you print it, you will see something like it:
ChainedError: My message
at ...
at ...
at ...
Caused By: TheOtherErrorType: The other error message
at ...
at ...
at ...
Type definition
License
MIT