I have a top level exception handler that looks like:
window.onerror = function(msg, file, line) {
var text = msg + " " + file + "(" + line + ")";
alert(text);
};
When I throw an Error exception from a DOM signal handler that was
attached using Mochikit.Signal.connect my top level exception handler
never gets called. There was a thread not to long ago discussing how
Mochikit.Signal should deal with exceptions and it sounds it like now
the code is just passing along the excpetion if only one handler raised
an exception. I am using the latest version 639 which has this change,
but I still don't see why my top level exception handler is not getting
called. Is there a better or more standard way to set up a top level
exception handler?
If I throw an excpetion in my signal handler using the following line,
then my top level excpetion handler does get called.
setTimeout(function () { throw exception; }, 0);
Does this have somehting to do with the context in which the signal
function is called? Could this only be an issue for signals associated
with DOM events?
Thanks,
Doug
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---