onError in js?

  • From: Alex Hall <mehgcap@xxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Sun, 01 Mar 2009 12:50:35 -0500

Hi all,
I keep getting a strange error (expected semicolon) in javascript and I have no idea why. I looked into getting a line number and found out about window.onerror, which I am now trying to use. However, it is not working! Here is my function:
 function oe(msg, addr, linenum){
alert(msg+" on line "+linenum+".  URL: "+addr);
return true;

It is called like this, after all my other functions:
window.onerror=oe;
but it does not do anything. All the alerts in my function (the one giving me trouble, not the onerror one) work fine, but as soon as it gets to the part where this onerror should fire, all alerts stop and I am back at my page. Am I doing something wrong? Does something need to be in a different place? Thanks.

Have a great day,
Alex
__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts:

  • » onError in js? - Alex Hall