@imbricate/core
Version:
Imbricate Core, Notebook for Engineers
28 lines (27 loc) • 675 B
JavaScript
;
/**
* @author WMXPY
* @namespace Error
* @description Imbricate Error
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImbricateError = void 0;
class ImbricateError extends Error {
constructor(message, type, reason) {
super(message);
this._type = type;
this._message = message;
this._reason = reason;
Object.setPrototypeOf(this, ImbricateError.prototype);
}
get message() {
return this._message;
}
get reason() {
return this._reason;
}
toString() {
return `[${this._type}] ${this.message}`;
}
}
exports.ImbricateError = ImbricateError;