HI

I have the following code to try to custom handle any output errors:

$(window).error(function(msg, url, line){
        alert('Error: ' + msg + '\n' + 'File: ' + url + '\n' + 'Line: ' +
line);
});

However, any errors produced from vanilla javascript seem to produced
lots of undefined properties, such as:

if I trigger a error with an undefined variable like so:

alert(foobar);

the alert dialog shows:

Error:[object Object]
File: undefined
Line: undefined

Am I doing something wrong or do I need to set a custom error handler
for both the jquery object and raw vanilla javascript?

Cheers

Reply via email to