catch errors on response decoding

This commit is contained in:
Dietmar Maurer 2011-11-16 09:06:26 +01:00
parent 61ca4432be
commit 52406c4273

View File

@ -319,8 +319,10 @@ Ext.define('PVE.Utils', { statics: {
if (options.waitMsgTarget) {
options.waitMsgTarget.setLoading(false);
}
var result = Ext.decode(response.responseText);
response.result = result || {};
response.result = {};
try {
response.result = Ext.decode(response.responseText);
} catch(e) {};
var msg = "Connection error - server offline?";
if (response.aborted) {
msg = 'Transaction aborted.';