-
8 May 2012 9:43 AM #1
Best way to add global ajax error handling?
Best way to add global ajax error handling?
Hi, reading over various posts and trying stuff out. However, I still haven't had success attaching a global error handler for my ajax calls.
I read through
http://www.sencha.com/forum/showthread.php?140693-Global-exception-handling-for-data-requests
in Ext.application{ lauch block:
Ext.util.Observable.observe(Ext.data.Connection);
Ext.data.Connection.on('requestexception', function(dataconn, response, options){
but getting script error
I'm a bit lost. Any help greatly appreciated.
-
8 May 2012 9:47 AM #2
Try this
Code:Ext.Ajax.on({ requestcomplete: this.onRequestComplete, requestexception: this.onRequestException, beforerequest: this.onBeforeRequest, scope: this });
-
8 May 2012 9:51 AM #3
-
4 Oct 2012 3:38 AM #4
would this catch Stores\Models network requests or just explicit Ext.Ajax.request s ?
-
4 Oct 2012 3:43 AM #5
Only Ext.Ajax.request if I recall correctly
-
4 Oct 2012 3:44 AM #6
bummer
back to overriding Ext.data.Connection then...
-
4 Oct 2012 5:18 AM #7
Global Exception
Global Exception
Hi,
Where to add the Code Block in our apps
Last edited by venkatesh.R; 4 Oct 2012 at 5:19 AM. Reason: removed code block
-
4 Oct 2012 5:26 AM #8
You can add it to the launch function of app.js.
-
4 Oct 2012 6:06 AM #9
Global Exception
Global Exception
Hi,
Thanks for your Info.
-
5 Oct 2012 3:04 AM #10
Global ajax exception
Global ajax exception
Hi,
I have added the above specified code block in launch() function of app.js
But i got Uncaught TypeError: Cannot read property 'fn' of undefined .
any suggestion on this issue.
Thanks


Reply With Quote