
Custom error implementation.
yarn add @xstd/custom-error
# or
npm install @xstd/custom-error --save
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);
}