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) {
|
||||||
_gaq.push([
|
if (typeof error.error !== 'undefined' && typeof error.error.stack !== 'undefined') {
|
||||||
'_trackEvent',
|
_gaq.push([
|
||||||
'global',
|
'_trackEvent',
|
||||||
'exception',
|
'global',
|
||||||
`${error.filename}(${error.lineno}): ${error.message}`
|
'exception',
|
||||||
]);
|
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