Clean up error logs
This commit is contained in:
parent
93cec78d6e
commit
c5cac623a7
1 changed files with 6 additions and 4 deletions
|
|
@ -59,14 +59,17 @@
|
|||
NINJA.isRegistered = {{ \Utils::isRegistered() ? 'true' : 'false' }};
|
||||
|
||||
window.onerror = function (errorMsg, url, lineNumber, column, error) {
|
||||
// Error in hosted third party library
|
||||
if (errorMsg.indexOf('Script error.') > -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Error due to incognito mode
|
||||
if (errorMsg.indexOf('DOM Exception 22') > -1) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// Use StackTraceJS to parse the error context
|
||||
if (error) {
|
||||
var message = error.message ? error.message : error;
|
||||
StackTrace.fromError(error).then(function (result) {
|
||||
var gps = new StackTraceGPS();
|
||||
gps.findFunctionName(result[0]).then(function (result) {
|
||||
|
|
@ -78,8 +81,7 @@
|
|||
}
|
||||
|
||||
trackEvent('/error', errorMsg);
|
||||
} catch (err) {
|
||||
}
|
||||
} catch (err) {}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue