1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | exports.ParseError = ParseError;
|
13 | exports.SyntaxError = SyntaxError;
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | SyntaxError.prototype.__proto__ = Error.prototype;
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 | function ParseError(msg) {
|
29 | this.name = 'ParseError';
|
30 | this.message = msg;
|
31 | Error.captureStackTrace(this, ParseError);
|
32 | }
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | ParseError.prototype.__proto__ = Error.prototype;
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 | function SyntaxError(msg) {
|
48 | this.name = 'SyntaxError';
|
49 | this.message = msg;
|
50 | Error.captureStackTrace(this, ParseError);
|
51 | }
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | SyntaxError.prototype.__proto__ = Error.prototype;
|
58 |
|