custom error handler around browser event loop?

custom error handler around browser event loop?


The development group seemed like the right place for this question;
my apologies in advance if I should have used the broader group.
My company is using jQuery to build a very cool web app. We love it.
We're trying to do as much right as possible, including exception
handling. I've got a custom error handler that I want all errors to go
through so that we can do things like report them back to the server,
add debug alerts, etc.
Everything works great in IE(6/7), but I'm missing a set of errors in
Firefox. These are errors that are thrown during the browser event
loop. I know that's not a jQuery thing, but I wonder if jQuery might
have someplace that I can hook into to put a try, catch around the
whole darn thing. I have not found anything helpful by googling,
though it's hard to know the right query.
Here's an html page that demonstrates the problem. Just update the
location of the jquery.js and it should work fine.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Exception Example</title>
<script type="text/javascript" src="./jquery-1.2.3.pack.js"></
script>
<style>
body { font-family: Tahoma, Arial, sans-serif }
div { margin: 20px }
div #errorConsoleMsg {
font-size: smaller;
font-weight: bold;
margin: 20px 60px 20px 60px; }
</style>
</head>
<body>
<div>
Examples of throwing errors from all the places I care about.<br /