On 17 Apr, 20:17, Ken Snyder <[EMAIL PROTECTED]> wrote:
 > Check out PPK's notes and test results on window.error 
 > :http://www.quirksmode.org/js/events_compinfo.html 
.  Perhaps it has
 > something to do with the limitations of window.onerror?

Hmm - that page certainly doesn't inspire confidence in window.onerror.

 > So what are you trying to do with this callback exactly?

We're in the process of writing a Javascript-intensive application.  
We're all running Firebug, so if there's a Javascript error, we know  
about it because we get the dreaded red cross in the status bar. But  
when we get to the point where we start beta testing with real users,  
we want them to tell us if something goes wrong. If they don't have  
Firebug (and most of them won't) nothing obvious happens when there's  
an error. We want to display a large, obvious error message which they  
can tell us about so that we know exactly what's gone wrong.

We've already achieved this if an Ajax request goes wrong by  
registering onComplete and onException Ajax.Responders along the  
following lines:

Ajax.Responders.register({
   onComplete: function(request, transport, json) {
     if(!request.success())
       // Report error
   },

   onException: function(request, exception) {
     // Report error
   }
});

But that's no help if it's "general" Javascript which throws an  
exception.

If you (or anyone else) can suggest an alternative to window.onerror  
which achieves the desired result, I will be forever grateful!

Thanks in advance,

Paul.


--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-spinoffs@googlegroups.com
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