From 0edff2b744e9127bb893b1fa47dc32e01235e88a Mon Sep 17 00:00:00 2001 From: ksa Date: Sun, 16 Nov 2014 19:41:00 +0100 Subject: [PATCH 1/2] More strict ignoreErrors --- src/raven.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/raven.js b/src/raven.js index 612816924962..fb30717b40e3 100644 --- a/src/raven.js +++ b/src/raven.js @@ -76,12 +76,10 @@ var Raven = { // "Script error." is hard coded into browsers for errors that it can't read. // this is the result of a script being pulled in from an external domain and CORS. - globalOptions.ignoreErrors.push('Script error.'); - globalOptions.ignoreErrors.push('Script error'); - - // Other variants of external script errors: - globalOptions.ignoreErrors.push('Javascript error: Script error on line 0'); - globalOptions.ignoreErrors.push('Javascript error: Script error. on line 0'); + globalOptions.ignoreErrors.push(/^Script error.$/); + globalOptions.ignoreErrors.push(/^Script error$/); + globalOptions.ignoreErrors.push(/^Javascript error: Script error on line 0$/); + globalOptions.ignoreErrors.push(/^Javascript error: Script error. on line 0$/); // join regexp rules into one big rule globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors); From 4d646308d9a2fa241e73548392da02bdbb7d7f71 Mon Sep 17 00:00:00 2001 From: ksa Date: Sun, 16 Nov 2014 20:16:50 +0100 Subject: [PATCH 2/2] More strict ignoreErrors --- src/raven.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/raven.js b/src/raven.js index fb30717b40e3..2832c819855f 100644 --- a/src/raven.js +++ b/src/raven.js @@ -76,10 +76,8 @@ var Raven = { // "Script error." is hard coded into browsers for errors that it can't read. // this is the result of a script being pulled in from an external domain and CORS. - globalOptions.ignoreErrors.push(/^Script error.$/); - globalOptions.ignoreErrors.push(/^Script error$/); - globalOptions.ignoreErrors.push(/^Javascript error: Script error on line 0$/); - globalOptions.ignoreErrors.push(/^Javascript error: Script error. on line 0$/); + globalOptions.ignoreErrors.push(/^Script error\.?$/); + globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/); // join regexp rules into one big rule globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);