Great, that works fine.
Since I have many different requests in my application, I can't handle all the exceptions in the same way. I have to delegate the handling to the request proxy.
Here is the code:
Code:
Ext.Ajax.on('requestcomplete', function(conn, response, options){
try{
eval("(" + response.responseText + ')')
}
catch(e){
var proxy=response.request.options.scope;
proxy.fireEvent('exception');
}
});
After this, I just need to create the 'exception' event listener for the proxies that I want.
Now, I know I shouldn't use eval() to evaluate the validity of my JSON response, but that was the easiest thing to do.
Thanks again