Forum Moderators: DixonJones

Message Too Old, No Replies

JavaScript Error Reporting problems

Can you help?

         

ChrisXenon

10:18 am on Sep 11, 2002 (gmt 0)

10+ Year Member



I have a home-grown logging system which records many aspects of my visitors experience, including any HavaScript errors they may see.

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

Mikkel Svendsen

1:59 am on Sep 13, 2002 (gmt 0)

10+ Year Member



In my experience anything dependant on client side javascript will suffer from the fact that even correct javascript will often not work in old warn out installations of even fully javascript compatible browsers. And then comes the ones that have it turned off or use a browser that don't support the script you use.

You will probably have to live with some of that - but if the numbers are high enough it should even out some ...