| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- "use strict";
- // Copyright (c) .NET Foundation. All rights reserved.
- // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
- var __extends = (this && this.__extends) || (function () {
- var 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 function (d, b) {
- extendStatics(d, b);
- function __() { this.constructor = d; }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
- };
- })();
- Object.defineProperty(exports, "__esModule", { value: true });
- /** Error thrown when an HTTP request fails. */
- var HttpError = /** @class */ (function (_super) {
- __extends(HttpError, _super);
- /** Constructs a new instance of {@link @aspnet/signalr.HttpError}.
- *
- * @param {string} errorMessage A descriptive error message.
- * @param {number} statusCode The HTTP status code represented by this error.
- */
- function HttpError(errorMessage, statusCode) {
- var _newTarget = this.constructor;
- var _this = this;
- var trueProto = _newTarget.prototype;
- _this = _super.call(this, errorMessage) || this;
- _this.statusCode = statusCode;
- // Workaround issue in Typescript compiler
- // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200
- _this.__proto__ = trueProto;
- return _this;
- }
- return HttpError;
- }(Error));
- exports.HttpError = HttpError;
- /** Error thrown when a timeout elapses. */
- var TimeoutError = /** @class */ (function (_super) {
- __extends(TimeoutError, _super);
- /** Constructs a new instance of {@link @aspnet/signalr.TimeoutError}.
- *
- * @param {string} errorMessage A descriptive error message.
- */
- function TimeoutError(errorMessage) {
- var _newTarget = this.constructor;
- if (errorMessage === void 0) { errorMessage = "A timeout occurred."; }
- var _this = this;
- var trueProto = _newTarget.prototype;
- _this = _super.call(this, errorMessage) || this;
- // Workaround issue in Typescript compiler
- // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200
- _this.__proto__ = trueProto;
- return _this;
- }
- return TimeoutError;
- }(Error));
- exports.TimeoutError = TimeoutError;
- /** Error thrown when an action is aborted. */
- var AbortError = /** @class */ (function (_super) {
- __extends(AbortError, _super);
- /** Constructs a new instance of {@link AbortError}.
- *
- * @param {string} errorMessage A descriptive error message.
- */
- function AbortError(errorMessage) {
- var _newTarget = this.constructor;
- if (errorMessage === void 0) { errorMessage = "An abort occurred."; }
- var _this = this;
- var trueProto = _newTarget.prototype;
- _this = _super.call(this, errorMessage) || this;
- // Workaround issue in Typescript compiler
- // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200
- _this.__proto__ = trueProto;
- return _this;
- }
- return AbortError;
- }(Error));
- exports.AbortError = AbortError;
- //# sourceMappingURL=Errors.js.map
|