UNPKG

honion

Version:
24 lines (23 loc) 702 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HonionException = void 0; class HonionException extends Error { constructor(error) { var _a; super(""); this.error = error; this.breakthrough = false; this.name = this.constructor.name; if (typeof error == "string") { this.message = error; } else if (typeof error == "object") { this.message = (_a = error.message) !== null && _a !== void 0 ? _a : ""; } } setBreakthrough(breakthrough = true) { this.breakthrough = breakthrough; return this; } } exports.HonionException = HonionException;