extendable-error
v0.1.7
Published
A simple extendable error class that extends Error.
Downloads
4,685,435
Readme
Extendable Error
A simple abstract extendable error class that extends Error
, which handles the error name
, message
and stack
property.
Install
npm install extendable-error --save
Usage
import ExtendableError from 'extendable-error';
class SomeError extends ExtendableError {
constructor(
message: string,
public code: number
) {
super(message);
}
}
let someError = new SomeError('Some error', 0x0001);
License
MIT License.