I use the window.onerror to alert javascript errors for debugging.
window.onerror = function(msg, url, line) {
alert(msg + '\nLine: ' + line);
};
When an error is fired, it can alert this actual error message in IE. But in firefox, it just alerts "Script error!", but I can still see the actual error message in firefox's error console.
I remembered several months ago when I worked on another project, firefox did not work like this. But I cannot get the code of that project currently. So I wonder what are the possible problems with this?