UNPKG

@rarible/utils

Version:
17 lines (16 loc) 725 B
import { CustomError as CustomErrorBase } from "ts-custom-error"; export class CustomError extends CustomErrorBase { constructor(message, _options) { super(message, { cause: _options === null || _options === void 0 ? void 0 : _options.cause }); this.data = _options === null || _options === void 0 ? void 0 : _options.data; this.cause = _options === null || _options === void 0 ? void 0 : _options.cause; const name = _options === null || _options === void 0 ? void 0 : _options.name; if (name) { Object.defineProperty(this, "name", { value: name, enumerable: false, configurable: true, }); } } }