Hi Gian Marco!
Is it possible to handle exceptions directly on client method handler?
//server code
public class EchoService
{
public string Echo(string value)
{
throw new ApplicationException("An error occured");
return value;
}
}
// client code
EchoService.echo('hello world!', function (result) {
// Can I detect here if a server exception occurred?
console.log(result);
});
I know I can catch server exception in this way:
Ext.direct.Manager.on('exception', function (event) {
alert(Ext.encode(event))
});
But I don't like it and besides 'function (result) { }' is called with result = null and I don't know if there was an axception.
Thanks.
Marco