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 | Object.defineProperty(exports, "__esModule", { value: true });
|
12 | var os_1 = require("os");
|
13 | var chalk = require("chalk");
|
14 | var Exception = (function (_super) {
|
15 | __extends(Exception, _super);
|
16 | function Exception(msg, innerException) {
|
17 | var _this = _super.call(this, innerException ? chalk.red(msg) + " -> " + chalk.red(innerException.stack || '') : chalk.red(msg)) || this;
|
18 | _this.innerException = innerException;
|
19 | return _this;
|
20 | }
|
21 | return Exception;
|
22 | }(Error));
|
23 | exports.Exception = Exception;
|
24 | var AggregateException = (function (_super) {
|
25 | __extends(AggregateException, _super);
|
26 | function AggregateException(exceptions) {
|
27 | var _this = _super.call(this, "Multiple exceptions occurred (" + exceptions.length + ") " + chalk.red("[" + exceptions.map(function (e) { return e.stack; }).join(', ') + "]")) || this;
|
28 | _this.exceptions = exceptions;
|
29 | return _this;
|
30 | }
|
31 | Object.defineProperty(AggregateException.prototype, "stack", {
|
32 | get: function () {
|
33 | return this.exceptions.map(function (e) { return e.stack; }).join(os_1.EOL);
|
34 | },
|
35 | enumerable: true,
|
36 | configurable: true
|
37 | });
|
38 | AggregateException.prototype.toString = function () {
|
39 | return this.exceptions.map(function (e) { return e.toString(); }).join(os_1.EOL);
|
40 | };
|
41 | return AggregateException;
|
42 | }(Exception));
|
43 | exports.AggregateException = AggregateException;
|
44 | var NotImplementedException = (function (_super) {
|
45 | __extends(NotImplementedException, _super);
|
46 | function NotImplementedException() {
|
47 | return _super.call(this, 'Not implemented') || this;
|
48 | }
|
49 | return NotImplementedException;
|
50 | }(Exception));
|
51 | exports.NotImplementedException = NotImplementedException;
|
52 | var NotSupportedException = (function (_super) {
|
53 | __extends(NotSupportedException, _super);
|
54 | function NotSupportedException() {
|
55 | return _super.call(this, 'This operation is not supported in a browserless context and never will be') || this;
|
56 | }
|
57 | return NotSupportedException;
|
58 | }(Exception));
|
59 | exports.NotSupportedException = NotSupportedException;
|
60 | var CompilerException = (function (_super) {
|
61 | __extends(CompilerException, _super);
|
62 | function CompilerException() {
|
63 | return _super !== null && _super.apply(this, arguments) || this;
|
64 | }
|
65 | return CompilerException;
|
66 | }(Exception));
|
67 | exports.CompilerException = CompilerException;
|
68 | var ConfigurationException = (function (_super) {
|
69 | __extends(ConfigurationException, _super);
|
70 | function ConfigurationException() {
|
71 | return _super !== null && _super.apply(this, arguments) || this;
|
72 | }
|
73 | return ConfigurationException;
|
74 | }(Exception));
|
75 | exports.ConfigurationException = ConfigurationException;
|
76 | var FilesystemException = (function (_super) {
|
77 | __extends(FilesystemException, _super);
|
78 | function FilesystemException() {
|
79 | return _super !== null && _super.apply(this, arguments) || this;
|
80 | }
|
81 | return FilesystemException;
|
82 | }(Exception));
|
83 | exports.FilesystemException = FilesystemException;
|
84 | var ModuleException = (function (_super) {
|
85 | __extends(ModuleException, _super);
|
86 | function ModuleException() {
|
87 | return _super !== null && _super.apply(this, arguments) || this;
|
88 | }
|
89 | return ModuleException;
|
90 | }(Exception));
|
91 | exports.ModuleException = ModuleException;
|
92 | var OutputException = (function (_super) {
|
93 | __extends(OutputException, _super);
|
94 | function OutputException() {
|
95 | return _super !== null && _super.apply(this, arguments) || this;
|
96 | }
|
97 | return OutputException;
|
98 | }(Exception));
|
99 | exports.OutputException = OutputException;
|
100 | var PlatformException = (function (_super) {
|
101 | __extends(PlatformException, _super);
|
102 | function PlatformException() {
|
103 | return _super !== null && _super.apply(this, arguments) || this;
|
104 | }
|
105 | return PlatformException;
|
106 | }(Exception));
|
107 | exports.PlatformException = PlatformException;
|
108 | var RendererException = (function (_super) {
|
109 | __extends(RendererException, _super);
|
110 | function RendererException() {
|
111 | return _super !== null && _super.apply(this, arguments) || this;
|
112 | }
|
113 | return RendererException;
|
114 | }(Exception));
|
115 | exports.RendererException = RendererException;
|
116 | var ResourceException = (function (_super) {
|
117 | __extends(ResourceException, _super);
|
118 | function ResourceException() {
|
119 | return _super !== null && _super.apply(this, arguments) || this;
|
120 | }
|
121 | return ResourceException;
|
122 | }(Exception));
|
123 | exports.ResourceException = ResourceException;
|
124 | var RuntimeException = (function (_super) {
|
125 | __extends(RuntimeException, _super);
|
126 | function RuntimeException() {
|
127 | return _super !== null && _super.apply(this, arguments) || this;
|
128 | }
|
129 | return RuntimeException;
|
130 | }(Exception));
|
131 | exports.RuntimeException = RuntimeException;
|
132 | var RouteException = (function (_super) {
|
133 | __extends(RouteException, _super);
|
134 | function RouteException() {
|
135 | return _super !== null && _super.apply(this, arguments) || this;
|
136 | }
|
137 | return RouteException;
|
138 | }(Exception));
|
139 | exports.RouteException = RouteException;
|
140 | var SnapshotException = (function (_super) {
|
141 | __extends(SnapshotException, _super);
|
142 | function SnapshotException() {
|
143 | return _super !== null && _super.apply(this, arguments) || this;
|
144 | }
|
145 | return SnapshotException;
|
146 | }(Exception));
|
147 | exports.SnapshotException = SnapshotException;
|
148 | var StaticAnalysisException = (function (_super) {
|
149 | __extends(StaticAnalysisException, _super);
|
150 | function StaticAnalysisException() {
|
151 | return _super !== null && _super.apply(this, arguments) || this;
|
152 | }
|
153 | return StaticAnalysisException;
|
154 | }(Exception));
|
155 | exports.StaticAnalysisException = StaticAnalysisException;
|
156 | var TranspileException = (function (_super) {
|
157 | __extends(TranspileException, _super);
|
158 | function TranspileException() {
|
159 | return _super !== null && _super.apply(this, arguments) || this;
|
160 | }
|
161 | return TranspileException;
|
162 | }(Exception));
|
163 | exports.TranspileException = TranspileException;
|
164 |
|
\ | No newline at end of file |