}
} catch(e) {
- res = { success : false, errorMsg : response.responseText, errors : true };
+ res = { success : false, errorMsg : response.responseText || Roo.encode(response), errors : true };
+ }
+ //Roo.log(response.responseText);
+ if (!res.success && !res.errorMsg) {
+ res.errorMsg = Roo.encode(response);
}
return res;
},
response.argument = options ? options.argument : null;
this.fireEvent("requestexception", this, response, options, e);
var res = Roo.callback(options.failure, options.scope, [response, options]);
+
if (res !== true) {
+ var decode = this.processResponse(response);
+
Roo.MessageBox.hide(); // hide any existing messages..
- Roo.MessageBox.alert("Error", "Error Sending" + JSON.stringify(response));
+ Roo.MessageBox.alert("Error", "Error Sending" + decode.errorMsg);
}
}
});
\ No newline at end of file