@xstd/custom-error
v0.2.0
Published
Custom error implementation
Readme
@xstd/custom-error
Custom error implementation.
📦 Installation
yarn add @xstd/custom-error
# or
npm install @xstd/custom-error --save📜 Documentation
CustomError
interface CustomErrorOptions extends Readonly<ErrorOptions> {
readonly message?: string;
}
/**
* A Custom Error with a specific name.
*/
declare class CustomError<GName extends string = string> extends Error {
readonly name: GName;
constructor(name: GName, options?: CustomErrorOptions);
}