PDA

View Full Version : global ext-js error handling



johija
26 Jul 2013, 9:58 AM
Is there a way to handle all JavaScript errors / any Exceptions in ExtJS application globally and route it to a function that alerts the user on a server error?

window:onerror() doesn't seem to handle all the JavaScript errors, hence looking for some kind of catch in code, and wrap it to a more generic exception so that would be caught?

existdissolve
27 Jul 2013, 4:46 AM
Is there a way to handle all JavaScript errors / any Exceptions in ExtJS application globally and route it to a function that alerts the user on a server error?

window:onerror() doesn't seem to handle all the JavaScript errors, hence looking for some kind of catch in code, and wrap it to a more generic exception so that would be caught?

You can trap all ajax errors by setting up a listener on Ext.Ajax requestexception event: 3e