You can try the predefined events:

onError, onException, onFailure

-E

On 12/14/06, JRigby <[EMAIL PROTECTED]> wrote:
>
> How do you guys/girls trap Javascript errors in oncomplete and
> afterfinish? The browser nor FireBug reports JS errors that occur in
> this block. It just stops processing with no indication of where the
> error occurred.
>
> Currently I use a try/catch statement and print the error in the catch.
> Something like this:
>
> new Ajax.Updater('div', 'page.html', {
>     onComplete: function(t) {
>         try {
>            //some code
>         }
>         catch(err) {
>            alert("There was an Error:\n" + err);
>         }
> });
>
>
> Are there better methods?
>
> Thanks
>
>
> >
>


-- 
Eric Ryan Harrison

--~--~---------~--~----~------------~-------~--~----~
 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