Closed jcham closed 13 years ago
Hi jcham,
This isn't implemented yet. The problem is if we provided an errback then we'd be breaking expected behaviors as there would be an implicit argument for the callback. In the future we don't want exceptions thrown on the server-side due to client activity to disconnect the client (as it does now) and thus trigger a disconnect event on the client-side. When we have fixed that issue then indeed there will be a .on('error', func(){} ) event. However that event would probably still be global.
We've decided not to have an errback for function calls or variable syncing as we don't have the facilities to provide accurate error information. However there are events emitted for failed connects or server disconnected in 0.7 as documented here:
Thanks for the report jcham, closing.
Sorry if I'm missing this documented somewhere obvious, but what is the proper way for client calls to handle connection errors? Obviously an errback in the parameters wouldn't work.
For example, this would seem to be a common pattern:
but if the network or server were down, how would the client code know about it. Is the only way to listen to the (global) 'disconnect' event?
What'd be great would be something like: