UNPKG

efriend

Version:
16 lines (15 loc) 626 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.BaseError = void 0; const error_util_js_1 = require("./error.util.js"); class BaseError extends Error { constructor({ code, message, error, data, details }) { super(message); this.code = code; this.message = message !== null && message !== void 0 ? message : error_util_js_1.errorUtil.getMessage(code); this.trace = error instanceof Error ? error === null || error === void 0 ? void 0 : error.stack : error; this.data = data; this.details = details; } } exports.BaseError = BaseError;