On 15/01/07, Dave Crane <[EMAIL PROTECTED]> wrote:
> Well, a bit of digging later (darn searches for the wrong item, Venkman > debugger++), I've found that I can declare onException: > function(request,transport) and get access to transport.message for telling > me what went wrong. Hopefully exceptions won't be common in the code, but > I'll leave the handler in anyway, and make it do something nice. > I've found this to be problematic at times too - if you're chaining together several functions in response to an async callback, then large portions of your code will fall under the exception trap. Adding an onException handler that simply re-throws the exception doesn't give you full access to the stack trace. Usuallly, I just hack prototype.js and temporarily remove the try/catch that invokes the onException callback (in 1.5.0_rc1, shipping with
Cheers Dave, I'll bear that in mind - I keep everything in subversion, so if I screw up it isn't too hard to fix :> I'm not trying to do anything that requires chaining yet - just simple (hah!) tweaks to make the interface a bit more pleasant than 'type, submit, wait for reload, bugger, messed up'. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
