1 | var __extends = (this && this.__extends) || (function () {
|
2 | var extendStatics = Object.setPrototypeOf ||
|
3 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
4 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
5 | return function (d, b) {
|
6 | extendStatics(d, b);
|
7 | function __() { this.constructor = d; }
|
8 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
9 | };
|
10 | })();
|
11 |
|
12 |
|
13 |
|
14 | var Exception = (function (_super) {
|
15 | __extends(Exception, _super);
|
16 | function Exception(message) {
|
17 | var _this = _super.call(this, message) || this;
|
18 | _this.message = message;
|
19 | _this.name = 'Exception';
|
20 | _this.stack = new Error().stack;
|
21 | return _this;
|
22 | }
|
23 | Exception.prototype.toString = function () {
|
24 | return this.name + ": " + this.message;
|
25 | };
|
26 | return Exception;
|
27 | }(Error));
|
28 | export { Exception };
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | var DetailedError = (function (_super) {
|
46 | __extends(DetailedError, _super);
|
47 | function DetailedError(
|
48 | /**
|
49 | * The error message.
|
50 | */
|
51 | message,
|
52 | |
53 |
|
54 |
|
55 | details) {
|
56 | var _this = _super.call(this, message) || this;
|
57 | _this.message = message;
|
58 | _this.details = details;
|
59 | _this.name = 'DetailedError';
|
60 | return _this;
|
61 | }
|
62 | return DetailedError;
|
63 | }(Exception));
|
64 | export { DetailedError };
|