@donation-alerts/common
Version:
Common utils and types that are used in other @donation-alerts packages.
17 lines (16 loc) • 473 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomError = void 0;
/** @internal */
class CustomError extends Error {
constructor(message) {
super(message);
// restore prototype chain
Reflect.setPrototypeOf(this, new.target.prototype);
Error.captureStackTrace?.(this, new.target.constructor);
}
get name() {
return this.constructor.name;
}
}
exports.CustomError = CustomError;