Firebug and Microsoft Script Editor are wonderful things for debugging
errors, but only if the error reaches them to begin with.

In this project I'm working on - my first use of prototype - I was
getting an error from some fairly complex, post-ajax-response DOM
manipulation, which was quite hard to track down using alerts and
console.debugs in an onException responder.

I tried a fairly simple throw of my own ...

Ajax.Responders.register( { onException: function (request, err)
{ throw err; } } );

... but that didn't work because in prototype.js:784 (1.5.0) it mutes
every callback error thrown with a ...

try {
responder[callback].apply(...);
} catch (e) {}

Simply commenting out that try statement does the trick. Firebug and
MSE now receive the errors I'm throwing from my onException responder
and, even better, if I remove the responder the errors go back to
being muted because it's already part of an earlier catch... I'm just
choosing to throw the full error in my responder.

So - is there something I'm missing here? That try / catch just seemed
superfluous to me.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to