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 |
|
20 |
|
21 |
|
22 | function ParseError(msg) {
|
23 | this.name = 'ParseError';
|
24 | this.message = msg;
|
25 | if (Error.captureStackTrace) {
|
26 | Error.captureStackTrace(this, ParseError);
|
27 | }
|
28 | }
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 | ParseError.prototype.__proto__ = Error.prototype;
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 | function SyntaxError(msg) {
|
44 | this.name = 'SyntaxError';
|
45 | this.message = msg;
|
46 | if (Error.captureStackTrace) {
|
47 | Error.captureStackTrace(this, ParseError);
|
48 | }
|
49 | }
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 | SyntaxError.prototype.__proto__ = Error.prototype;
|