芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/node_modules/intl-messageformat/lib/error.js
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); export var ErrorCode; (function (ErrorCode) { // When we have a placeholder but no value to format ErrorCode["MISSING_VALUE"] = "MISSING_VALUE"; // When value supplied is invalid ErrorCode["INVALID_VALUE"] = "INVALID_VALUE"; // When we need specific Intl API but it's not available ErrorCode["MISSING_INTL_API"] = "MISSING_INTL_API"; })(ErrorCode || (ErrorCode = {})); var FormatError = /** @class */ (function (_super) { __extends(FormatError, _super); function FormatError(msg, code, originalMessage) { var _this = _super.call(this, msg) || this; _this.code = code; _this.originalMessage = originalMessage; return _this; } FormatError.prototype.toString = function () { return "[formatjs Error: " + this.code + "] " + this.message; }; return FormatError; }(Error)); export { FormatError }; var InvalidValueError = /** @class */ (function (_super) { __extends(InvalidValueError, _super); function InvalidValueError(variableId, value, options, originalMessage) { return _super.call(this, "Invalid values for \"" + variableId + "\": \"" + value + "\". Options are \"" + Object.keys(options).join('", "') + "\"", "INVALID_VALUE" /* INVALID_VALUE */, originalMessage) || this; } return InvalidValueError; }(FormatError)); export { InvalidValueError }; var InvalidValueTypeError = /** @class */ (function (_super) { __extends(InvalidValueTypeError, _super); function InvalidValueTypeError(value, type, originalMessage) { return _super.call(this, "Value for \"" + value + "\" must be of type " + type, "INVALID_VALUE" /* INVALID_VALUE */, originalMessage) || this; } return InvalidValueTypeError; }(FormatError)); export { InvalidValueTypeError }; var MissingValueError = /** @class */ (function (_super) { __extends(MissingValueError, _super); function MissingValueError(variableId, originalMessage) { return _super.call(this, "The intl string context variable \"" + variableId + "\" was not provided to the string \"" + originalMessage + "\"", "MISSING_VALUE" /* MISSING_VALUE */, originalMessage) || this; } return MissingValueError; }(FormatError)); export { MissingValueError }; //# sourceMappingURL=error.js.map