{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,+GAA+G;;;;;;;;;;;;AAE/G,+CAA+C;AAC/C;IAA+B,6BAAK;IAQhC;;;;OAIG;IACH,mBAAY,YAAoB,EAAE,UAAkB;;QAApD,iBAQC;QAPG,IAAM,SAAS,GAAG,WAAW,SAAS,CAAC;QACvC,QAAA,kBAAM,YAAY,CAAC,SAAC;QACpB,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAE7B,0CAA0C;QAC1C,8EAA8E;QAC9E,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;IAC/B,CAAC;IACL,gBAAC;AAAD,CAAC,AAtBD,CAA+B,KAAK,GAsBnC;AAtBY,8BAAS;AAwBtB,2CAA2C;AAC3C;IAAkC,gCAAK;IAKnC;;;OAGG;IACH,sBAAY,YAA4C;;QAA5C,6BAAA,EAAA,oCAA4C;QAAxD,iBAOC;QANG,IAAM,SAAS,GAAG,WAAW,SAAS,CAAC;QACvC,QAAA,kBAAM,YAAY,CAAC,SAAC;QAEpB,0CAA0C;QAC1C,8EAA8E;QAC9E,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;IAC/B,CAAC;IACL,mBAAC;AAAD,CAAC,AAjBD,CAAkC,KAAK,GAiBtC;AAjBY,oCAAY;AAmBzB,8CAA8C;AAC9C;IAAgC,8BAAK;IAKjC;;;OAGG;IACH,oBAAY,YAA2C;;QAA3C,6BAAA,EAAA,mCAA2C;QAAvD,iBAOC;QANG,IAAM,SAAS,GAAG,WAAW,SAAS,CAAC;QACvC,QAAA,kBAAM,YAAY,CAAC,SAAC;QAEpB,0CAA0C;QAC1C,8EAA8E;QAC9E,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;IAC/B,CAAC;IACL,iBAAC;AAAD,CAAC,AAjBD,CAAgC,KAAK,GAiBpC;AAjBY,gCAAU","sourcesContent":["// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\n\r\n/** Error thrown when an HTTP request fails. */\r\nexport class HttpError extends Error {\r\n // @ts-ignore: Intentionally unused.\r\n // tslint:disable-next-line:variable-name\r\n private __proto__: Error;\r\n\r\n /** The HTTP status code represented by this error. */\r\n public statusCode: number;\r\n\r\n /** Constructs a new instance of {@link @microsoft/signalr.HttpError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n * @param {number} statusCode The HTTP status code represented by this error.\r\n */\r\n constructor(errorMessage: string, statusCode: number) {\r\n const trueProto = new.target.prototype;\r\n super(errorMessage);\r\n this.statusCode = statusCode;\r\n\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n\r\n/** Error thrown when a timeout elapses. */\r\nexport class TimeoutError extends Error {\r\n // @ts-ignore: Intentionally unused.\r\n // tslint:disable-next-line:variable-name\r\n private __proto__: Error;\r\n\r\n /** Constructs a new instance of {@link @microsoft/signalr.TimeoutError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n */\r\n constructor(errorMessage: string = \"A timeout occurred.\") {\r\n const trueProto = new.target.prototype;\r\n super(errorMessage);\r\n\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n\r\n/** Error thrown when an action is aborted. */\r\nexport class AbortError extends Error {\r\n // @ts-ignore: Intentionally unused.\r\n // tslint:disable-next-line:variable-name\r\n private __proto__: Error;\r\n\r\n /** Constructs a new instance of {@link AbortError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n */\r\n constructor(errorMessage: string = \"An abort occurred.\") {\r\n const trueProto = new.target.prototype;\r\n super(errorMessage);\r\n\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n"]}