Adding more detailed exception tracking
This commit is contained in:
parent
491c9535a9
commit
0600d18bb5
@ -9,12 +9,21 @@ window._gaq = (typeof _gaq !== 'undefined') ? _gaq : {
|
|||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
window.addEventListener('error', function(error) {
|
window.addEventListener('error', function(error) {
|
||||||
|
if (typeof error.error !== 'undefined' && typeof error.error.stack !== 'undefined') {
|
||||||
_gaq.push([
|
_gaq.push([
|
||||||
'_trackEvent',
|
'_trackEvent',
|
||||||
'global',
|
'global',
|
||||||
'exception',
|
'exception',
|
||||||
`${error.filename}(${error.lineno}): ${error.message}`
|
error.error.stack
|
||||||
]);
|
]);
|
||||||
|
} else if (error.filename !== '') {
|
||||||
|
_gaq.push([
|
||||||
|
'_trackEvent',
|
||||||
|
'global',
|
||||||
|
'exception',
|
||||||
|
`${error.filename}(${error.lineno},${error.colno}): ${error.message}`
|
||||||
|
]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (document.body.querySelector('#content .application')) {
|
if (document.body.querySelector('#content .application')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user