Forum Moderators: DixonJones
I use this function to trap JS errors:
function report_error(msg, url, line)
{ debug('WEBPAGEERROR>>> msg='+msg+', url='+url+', line='+line);
record('WEBPAGEERROR>>> msg='+msg+', url='+url+', line='+line);
self.onerror = dummy;
return true;
};
self.onerror = report_error;
The record() function ties into the logging system and simply places the data repported by JavaScript into my log file.
The problem is this.
I am seeing reported errors which don't seem to make sense in the following ways:
1. I cannot reproduce them
2. They are rare - I am seeing maybe 10 errors a day
3. When I look at the JavaScrip files at the line numbers given, they look like very poor candidates for plausible sources of error - they can be blanks lines, or lines with no JavaScript in, or incredibly mundane etc.
I know that the line number reported might also be for JS files included within the file whoe name is reported, but this doesn't shed further light - the same comments apply.
One more fact - there are a disproportionate number of these reports from Netscape 4.62 users, but there are also a smattering of IEs too, of various versions.
So is anyone able to explain this for me?
Cheers,
Chris
You will probably have to live with some of that - but if the numbers are high enough it should even out some ...