check for exceptions from the server
This commit is contained in:
parent
101c3d3de1
commit
27e2d4e631
@ -238,6 +238,12 @@ YAHOO.extendX(Clipperz.PM.Proxy.PHP, Clipperz.PM.Proxy, {
|
|||||||
//deferredResult.addCallback(function(res) {MochiKit.Logging.logDebug("Proxy.PHP.response - 2: " + res.responseText); return res;});
|
//deferredResult.addCallback(function(res) {MochiKit.Logging.logDebug("Proxy.PHP.response - 2: " + res.responseText); return res;});
|
||||||
//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("Proxy.PHP.response - ERROR: " + res); return res;});
|
//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("Proxy.PHP.response - ERROR: " + res); return res;});
|
||||||
deferredResult.addCallback(MochiKit.Async.evalJSONRequest);
|
deferredResult.addCallback(MochiKit.Async.evalJSONRequest);
|
||||||
|
deferredResult.addCallback(function (someValues) {
|
||||||
|
if (someValues['result'] == 'EXCEPTION') {
|
||||||
|
throw someValues['message'];
|
||||||
|
}
|
||||||
|
return someValues;
|
||||||
|
})
|
||||||
deferredResult.callback();
|
deferredResult.callback();
|
||||||
|
|
||||||
return deferredResult;
|
return deferredResult;
|
||||||
|
Loading…
Reference in New Issue
Block a user