-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathcaptured-errors.js
371 lines (343 loc) · 14.7 KB
/
captured-errors.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
// jscs:disable disallowImplicitTypeConversion
// jscs:disable maximumLineLength
/* exported CapturedExceptions */
var CapturedExceptions = {};
CapturedExceptions.OPERA_854 = {
message: 'Statement on line 44: Type mismatch (usually a non-object value used where an object is required)\n' +
'Backtrace:\n' +
' Line 44 of linked script http://path/to/file.js\n' +
' this.undef();\n' +
' Line 31 of linked script http://path/to/file.js\n' +
' ex = ex || this.createException();\n' +
' Line 18 of linked script http://path/to/file.js\n' +
' var p = new printStackTrace.implementation(), result = p.run(ex);\n' +
' Line 4 of inline#1 script in http://path/to/file.js\n' +
' printTrace(printStackTrace());\n' +
' Line 7 of inline#1 script in http://path/to/file.js\n' +
' bar(n - 1);\n' +
' Line 11 of inline#1 script in http://path/to/file.js\n' +
' bar(2);\n' +
' Line 15 of inline#1 script in http://path/to/file.js\n' +
' foo();\n' +
'',
'opera#sourceloc': 44
};
CapturedExceptions.OPERA_902 = {
message: 'Statement on line 44: Type mismatch (usually a non-object value used where an object is required)\n' +
'Backtrace:\n' +
' Line 44 of linked script http://path/to/file.js\n' +
' this.undef();\n' +
' Line 31 of linked script http://path/to/file.js\n' +
' ex = ex || this.createException();\n' +
' Line 18 of linked script http://path/to/file.js\n' +
' var p = new printStackTrace.implementation(), result = p.run(ex);\n' +
' Line 4 of inline#1 script in http://path/to/file.js\n' +
' printTrace(printStackTrace());\n' +
' Line 7 of inline#1 script in http://path/to/file.js\n' +
' bar(n - 1);\n' +
' Line 11 of inline#1 script in http://path/to/file.js\n' +
' bar(2);\n' +
' Line 15 of inline#1 script in http://path/to/file.js\n' +
' foo();\n' +
'',
'opera#sourceloc': 44
};
CapturedExceptions.OPERA_927 = {
message: 'Statement on line 43: Type mismatch (usually a non-object value used where an object is required)\n' +
'Backtrace:\n' +
' Line 43 of linked script http://path/to/file.js\n' +
' bar(n - 1);\n' +
' Line 31 of linked script http://path/to/file.js\n' +
' bar(2);\n' +
' Line 18 of linked script http://path/to/file.js\n' +
' foo();\n' +
'',
'opera#sourceloc': 43
};
CapturedExceptions.OPERA_964 = {
message: 'Statement on line 42: Type mismatch (usually non-object value supplied where object required)\n' +
'Backtrace:\n' +
' Line 42 of linked script http://path/to/file.js\n' +
' this.undef();\n' +
' Line 27 of linked script http://path/to/file.js\n' +
' ex = ex || this.createException();\n' +
' Line 18 of linked script http://path/to/file.js: In function printStackTrace\n' +
' var p = new printStackTrace.implementation(), result = p.run(ex);\n' +
' Line 4 of inline#1 script in http://path/to/file.js: In function bar\n' +
' printTrace(printStackTrace());\n' +
' Line 7 of inline#1 script in http://path/to/file.js: In function bar\n' +
' bar(n - 1);\n' +
' Line 11 of inline#1 script in http://path/to/file.js: In function foo\n' +
' bar(2);\n' +
' Line 15 of inline#1 script in http://path/to/file.js\n' +
' foo();\n' +
'',
'opera#sourceloc': 42,
stacktrace: ' ... Line 27 of linked script http://path/to/file.js\n' +
' ex = ex || this.createException();\n' +
' Line 18 of linked script http://path/to/file.js: In function printStackTrace\n' +
' var p = new printStackTrace.implementation(), result = p.run(ex);\n' +
' Line 4 of inline#1 script in http://path/to/file.js: In function bar\n' +
' printTrace(printStackTrace());\n' +
' Line 7 of inline#1 script in http://path/to/file.js: In function bar\n' +
' bar(n - 1);\n' +
' Line 11 of inline#1 script in http://path/to/file.js: In function foo\n' +
' bar(2);\n' +
' Line 15 of inline#1 script in http://path/to/file.js\n' +
' foo();\n' +
''
};
CapturedExceptions.OPERA_10 = {
message: 'Statement on line 42: Type mismatch (usually non-object value supplied where object required)',
'opera#sourceloc': 42,
stacktrace: ' Line 42 of linked script http://path/to/file.js\n' +
' this.undef();\n' +
' Line 27 of linked script http://path/to/file.js\n' +
' ex = ex || this.createException();\n' +
' Line 18 of linked script http://path/to/file.js: In function printStackTrace\n' +
' var p = new printStackTrace.implementation(), result = p.run(ex);\n' +
' Line 4 of inline#1 script in http://path/to/file.js: In function bar\n' +
' printTrace(printStackTrace());\n' +
' Line 7 of inline#1 script in http://path/to/file.js: In function bar\n' +
' bar(n - 1);\n' +
' Line 11 of inline#1 script in http://path/to/file.js: In function foo\n' +
' bar(2);\n' +
' Line 15 of inline#1 script in http://path/to/file.js\n' +
' foo();\n' +
''
};
CapturedExceptions.OPERA_11 = {
message: '\'this.undef\' is not a function',
stack: '<anonymous function: run>([arguments not available])@http://path/to/file.js:27\n' +
'bar([arguments not available])@http://domain.com:1234/path/to/file.js:18\n' +
'foo([arguments not available])@http://domain.com:1234/path/to/file.js:11\n' +
'<anonymous function>@http://path/to/file.js:15\n' +
'Error created at <anonymous function>@http://path/to/file.js:15',
stacktrace: 'Error thrown at line 42, column 12 in <anonymous function: createException>() in http://path/to/file.js:\n' +
' this.undef();\n' +
'called from line 27, column 8 in <anonymous function: run>(ex) in http://path/to/file.js:\n' +
' ex = ex || this.createException();\n' +
'called from line 18, column 4 in printStackTrace(options) in http://path/to/file.js:\n' +
' var p = new printStackTrace.implementation(), result = p.run(ex);\n' +
'called from line 4, column 5 in bar(n) in http://path/to/file.js:\n' +
' printTrace(printStackTrace());\n' +
'called from line 7, column 4 in bar(n) in http://path/to/file.js:\n' +
' bar(n - 1);\n' +
'called from line 11, column 4 in foo() in http://path/to/file.js:\n' +
' bar(2);\n' +
'called from line 15, column 3 in http://path/to/file.js:\n' +
' foo();'
};
CapturedExceptions.OPERA_12 = {
message: 'Cannot convert \'x\' to object',
stack: '<anonymous function>([arguments not available])@http://localhost:8000/ExceptionLab.html:48\n' +
'dumpException3([arguments not available])@http://localhost:8000/ExceptionLab.html:46\n' +
'<anonymous function>([arguments not available])@http://localhost:8000/ExceptionLab.html:1',
stacktrace: 'Error thrown at line 48, column 12 in <anonymous function>(x) in http://localhost:8000/ExceptionLab.html:\n' +
' x.undef();\n' +
'called from line 46, column 8 in dumpException3() in http://localhost:8000/ExceptionLab.html:\n' +
' dumpException((function(x) {\n' +
'called from line 1, column 0 in <anonymous function>(event) in http://localhost:8000/ExceptionLab.html:\n' +
' dumpException3();'
};
CapturedExceptions.OPERA_25 = {
message: 'Cannot read property \'undef\' of null',
name: 'TypeError',
stack: 'TypeError: Cannot read property \'undef\' of null\n' +
' at http://path/to/file.js:47:22\n' +
' at foo (http://path/to/file.js:52:15)\n' +
' at bar (http://path/to/file.js:108:168)'
};
CapturedExceptions.CHROME_15 = {
'arguments': ['undef'],
message: 'Object #<Object> has no method \'undef\'',
stack: 'TypeError: Object #<Object> has no method \'undef\'\n' +
' at bar (http://path/to/file.js:13:17)\n' +
' at bar (http://path/to/file.js:16:5)\n' +
' at foo (http://path/to/file.js:20:5)\n' +
' at http://path/to/file.js:24:4'
};
CapturedExceptions.CHROME_36 = {
message: 'Default error',
name: 'Error',
stack: 'Error: Default error\n' +
' at dumpExceptionError (http://localhost:8080/file.js:41:27)\n' +
' at HTMLButtonElement.onclick (http://localhost:8080/file.js:107:146)'
};
CapturedExceptions.CHROME_46 = {
message: 'Default error',
name: 'Error',
stack: 'Error: Default error\n' +
' at new CustomError (http://localhost:8080/file.js:41:27)\n' +
' at HTMLButtonElement.onclick (http://localhost:8080/file.js:107:146)'
};
CapturedExceptions.CHROME_48_NESTED_EVAL = {
message: 'message string',
name: 'Error',
stack: 'Error: message string\n' +
'at baz (eval at foo (eval at speak (http://localhost:8080/file.js:21:17)), <anonymous>:1:30)\n' +
'at foo (eval at speak (http://localhost:8080/file.js:21:17), <anonymous>:2:96)\n' +
'at eval (eval at speak (http://localhost:8080/file.js:21:17), <anonymous>:4:18)\n' +
'at Object.speak (http://localhost:8080/file.js:21:17)\n' +
'at http://localhost:8080/file.js:31:13\n'
};
CapturedExceptions.CHROME_58_EVAL = {
message: 'message string',
name: 'Error',
stack: 'Error: message string\n' +
'at willThrow (eval at h (index.js:11), <anonymous>:3:3)\n' +
'at eval (eval at h (index.js:11), <anonymous>:6:1)\n' +
'at h (index.js:11)\n' +
'at g (index.js:6)\n' +
'at f (index.js:2)\n' +
'at index.js:23\n'
};
CapturedExceptions.FIREFOX_3 = {
fileName: 'http://127.0.0.1:8000/js/stacktrace.js',
lineNumber: 44,
message: 'this.undef is not a function',
name: 'TypeError',
stack: '()@http://127.0.0.1:8000/js/stacktrace.js:44\n' +
'(null)@http://127.0.0.1:8000/js/stacktrace.js:31\n' +
'printStackTrace()@http://127.0.0.1:8000/js/stacktrace.js:18\n' +
'bar(1)@http://127.0.0.1:8000/js/file.js:13\n' +
'bar(2)@http://127.0.0.1:8000/js/file.js:16\n' +
'foo()@http://127.0.0.1:8000/js/file.js:20\n' +
'@http://127.0.0.1:8000/js/file.js:24\n' +
''
};
CapturedExceptions.FIREFOX_7 = {
fileName: 'file:///G:/js/stacktrace.js',
lineNumber: 44,
stack: '()@file:///G:/js/stacktrace.js:44\n' +
'(null)@file:///G:/js/stacktrace.js:31\n' +
'printStackTrace()@file:///G:/js/stacktrace.js:18\n' +
'bar(1)@file:///G:/js/file.js:13\n' +
'bar(2)@file:///G:/js/file.js:16\n' +
'foo()@file:///G:/js/file.js:20\n' +
'@file:///G:/js/file.js:24\n' +
''
};
CapturedExceptions.FIREFOX_14 = {
message: 'x is null',
stack: '@http://path/to/file.js:48\n' +
'dumpException3@http://path/to/file.js:52\n' +
'onclick@http://path/to/file.js:1\n' +
'',
fileName: 'http://path/to/file.js',
lineNumber: 48
};
CapturedExceptions.FIREFOX_31 = {
message: 'Default error',
name: 'Error',
stack: 'foo@http://path/to/file.js:41:13\n' +
'bar@http://path/to/file.js:1:1\n' +
'',
fileName: 'http://path/to/file.js',
lineNumber: 41,
columnNumber: 12
};
CapturedExceptions.FIREFOX_43_NESTED_EVAL = {
columnNumber: 30,
fileName: 'http://localhost:8080/file.js line 25 > eval line 2 > eval',
lineNumber: 1,
message: 'message string',
stack: 'baz@http://localhost:8080/file.js line 26 > eval line 2 > eval:1:30\n' +
'foo@http://localhost:8080/file.js line 26 > eval:2:96\n' +
'@http://localhost:8080/file.js line 26 > eval:4:18\n' +
'speak@http://localhost:8080/file.js:26:17\n' +
'@http://localhost:8080/file.js:33:9'
};
CapturedExceptions.FIREFOX_43_FUNCTION_NAME_WITH_AT_SIGN = {
message: 'Dummy error',
name: 'Error',
stack: 'obj["@fn"]@Scratchpad/1:10:29\n' +
'@Scratchpad/1:11:1\n' +
'',
fileName: 'Scratchpad/1',
lineNumber: 10,
columnNumber: 29
};
CapturedExceptions.SAFARI_6 = {
message: '\'null\' is not an object (evaluating \'x.undef\')',
stack: '@http://path/to/file.js:48\n' +
'dumpException3@http://path/to/file.js:52\n' +
'onclick@http://path/to/file.js:82\n' +
'[native code]',
line: 48,
sourceURL: 'http://path/to/file.js'
};
CapturedExceptions.SAFARI_7 = {
message: '\'null\' is not an object (evaluating \'x.undef\')',
name: 'TypeError',
stack: 'http://path/to/file.js:48:22\n' +
'foo@http://path/to/file.js:52:15\n' +
'bar@http://path/to/file.js:108:107',
line: 47,
sourceURL: 'http://path/to/file.js'
};
CapturedExceptions.SAFARI_8 = {
message: 'null is not an object (evaluating \'x.undef\')',
name: 'TypeError',
stack: 'http://path/to/file.js:47:22\n' +
'foo@http://path/to/file.js:52:15\n' +
'bar@http://path/to/file.js:108:23',
line: 47,
column: 22,
sourceURL: 'http://path/to/file.js'
};
CapturedExceptions.SAFARI_8_EVAL = {
message: 'Can\'t find variable: getExceptionProps',
name: 'ReferenceError',
stack: 'eval code\n' +
'eval@[native code]\n' +
'foo@http://path/to/file.js:58:21\n' +
'bar@http://path/to/file.js:109:91',
line: 1,
column: 18
};
CapturedExceptions.SAFARI_9_NESTED_EVAL = {
column: 39,
line: 1,
message: 'message string',
stack: 'baz\n' +
'foo\n' +
'eval code\n' +
'eval@[native code]\n' +
'speak@http://localhost:8080/file.js:26:21\n' +
'global code@http://localhost:8080/file.js:33:18'
};
CapturedExceptions.IE_9 = {
message: 'Unable to get property \'undef\' of undefined or null reference',
description: 'Unable to get property \'undef\' of undefined or null reference'
};
CapturedExceptions.IE_10 = {
message: 'Unable to get property \'undef\' of undefined or null reference',
stack: 'TypeError: Unable to get property \'undef\' of undefined or null reference\n' +
' at Anonymous function (http://path/to/file.js:48:13)\n' +
' at foo (http://path/to/file.js:46:9)\n' +
' at bar (http://path/to/file.js:82:1)',
description: 'Unable to get property \'undef\' of undefined or null reference',
number: -2146823281
};
CapturedExceptions.IE_11 = {
message: 'Unable to get property \'undef\' of undefined or null reference',
name: 'TypeError',
stack: 'TypeError: Unable to get property \'undef\' of undefined or null reference\n' +
' at Anonymous function (http://path/to/file.js:47:21)\n' +
' at foo (http://path/to/file.js:45:13)\n' +
' at bar (http://path/to/file.js:108:1)',
description: 'Unable to get property \'undef\' of undefined or null reference',
number: -2146823281
};
CapturedExceptions.EDGE_20_NESTED_EVAL = {
description: 'message string',
message: 'message string',
name: 'Error',
stack: 'Error: message string\n' +
' at baz (eval code:1:18)\n' +
' at foo (eval code:2:90)\n' +
' at eval code (eval code:4:18)\n' +
' at speak (http://localhost:8080/file.js:25:17)\n' +
' at Global code (http://localhost:8080/file.js:32:9)'
};