UNPKG

@mvx/mvc

Version:

@mvx/mvc is mvc framework on server, base on koa, @tsdi frameworks

29 lines (27 loc) 699 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HttpError = void 0; const ioc_1 = require("@tsdi/ioc"); /** * http error * * @export * @class HttpError * @extends {Error} */ class HttpError extends Error { constructor(status, message) { super(); this.status = status; this.message = ioc_1.isArray(message) ? message.join('\n') : message; Error.captureStackTrace(this); } toString() { return `Http Error: ${this.status}, ${this.message}`; } static ρAnn() { return { "name": "HttpError" }; } } exports.HttpError = HttpError; //# sourceMappingURL=../sourcemaps/errors/HttpError.js.map