1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var tslib_1 = require("tslib");
|
4 | var AccountsError = (function (_super) {
|
5 | tslib_1.__extends(AccountsError, _super);
|
6 | function AccountsError(packageName, functionName, reason) {
|
7 | var _this = this;
|
8 |
|
9 | var message = reason
|
10 | ? "[ Accounts - " + packageName + " ] " + functionName + " : " + reason
|
11 | : packageName;
|
12 |
|
13 | _this = _super.call(this, message) || this;
|
14 |
|
15 | _this.packageName = packageName;
|
16 | _this.functionName = functionName;
|
17 | _this.reason = reason;
|
18 |
|
19 | Object.setPrototypeOf(_this, AccountsError.prototype);
|
20 |
|
21 | if (typeof Error.captureStackTrace === 'function') {
|
22 | Error.captureStackTrace(_this, _this.constructor);
|
23 | }
|
24 | else {
|
25 | _this.stack = new Error(message).stack;
|
26 | }
|
27 | return _this;
|
28 | }
|
29 | return AccountsError;
|
30 | }(Error));
|
31 | exports.default = AccountsError;
|
32 |
|
\ | No newline at end of file |