UNPKG

@rawcmd/core

Version:
20 lines 558 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class GenericError extends Error { constructor(message, code) { super(); this.name = this.constructor.name; this.message = message || null; this.code = code || null; Error.captureStackTrace(this, this.constructor); } toJSON() { return { code: this.code, name: this.name, message: this.message, }; } } exports.GenericError = GenericError; //# sourceMappingURL=generic.js.map