This must be a noob question, but after two days of browsing, reading and debugging I can't find what I am doing wrong. I need to handle request timeouts in store.load() requests. I have defined the exception in the proxy PHP Code:
exception: function(proxy, response, operation) {
alert('Exception');
}
and to simulate network trouble I tried both using a broken link as url and to unplug my ethernet cable. What I get is that the exception is immediately thrown, without waiting the 30s default timeout (checked proxy.timeout with firebug and it's 30000) What am i missing? Thanks for the help
What's happening here is that a 'timeout' is not the only exception that can be generated by the proxy request. In the tests you have explained here, the probable exceptions you got are here:
broken link - probably a internet lookup address fail, this is almost instantly known by the ajax request and therefore errors out right away
ethernet cord disconnected - internet not accessible error, your computer is notifying the ajax call almost instanstly that it's not connected to the internet
Since your computer knows about these errors almost immediately, there is no need for it to wait for the timeout period before reporting the exception.
A real test to get a timeout exception would be to put in your php script a sleep or wait (whatever the function is called in php) for a time that is longer than the timeout threshold you have defined in your store proxy.