Skip to content

Commit 1745ba8

Browse files
committed
Merge pull request #292 from skovhus/more-strict-ignoreErrors
More strict ignoreErrors
2 parents ee7fe10 + 4d64630 commit 1745ba8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/raven.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,8 @@ var Raven = {
7676

7777
// "Script error." is hard coded into browsers for errors that it can't read.
7878
// this is the result of a script being pulled in from an external domain and CORS.
79-
globalOptions.ignoreErrors.push('Script error.');
80-
globalOptions.ignoreErrors.push('Script error');
81-
82-
// Other variants of external script errors:
83-
globalOptions.ignoreErrors.push('Javascript error: Script error on line 0');
84-
globalOptions.ignoreErrors.push('Javascript error: Script error. on line 0');
79+
globalOptions.ignoreErrors.push(/^Script error\.?$/);
80+
globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/);
8581

8682
// join regexp rules into one big rule
8783
globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);

0 commit comments

Comments
 (0)