commit 2718c4ae8088ce0af63eef6171231a9b9acb12a5
parent 3673e6600bb2a547f5ae6c6b652896a2c2c7fe49
Author: Felicitus <felicitus@felicitus.org>
Date: Sun, 29 Mar 2015 22:57:20 +0200
Use the correct property when displaying exceptions
Diffstat:
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Dialogs/ExceptionWindow.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Dialogs/ExceptionWindow.js
@@ -141,6 +141,7 @@ Ext.define('PartKeepr.ExceptionWindow', {
* @param requestData The request data. May be empty.
*/
_showException: function (exception, requestData) {
+ console.log(exception);
var separator = "==================================";
if (!requestData) {
diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Util/ServiceCall.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Util/ServiceCall.js
@@ -52,8 +52,6 @@ Ext.define('PartKeepr.ServiceCall', {
this.parameters._format = "json";
- var callDefinition = Ext.encode(this.parameters);
-
var headers = {
"call": this.call,
"lang": Ext.getLocale()
@@ -75,8 +73,6 @@ Ext.define('PartKeepr.ServiceCall', {
onSuccess: function (responseObj, options) {
PartKeepr.getApplication().getStatusbar().endLoad();
- console.log(responseObj);
-
try {
var response = Ext.decode(responseObj.responseText);
} catch (ex) {
@@ -135,7 +131,6 @@ Ext.define('PartKeepr.ServiceCall', {
onError: function (response, options) {
var request;
- console.log(response);
try {
var data = Ext.decode(response.responseText);
@@ -144,8 +139,9 @@ Ext.define('PartKeepr.ServiceCall', {
request: Ext.encode(options)
};
- PartKeepr.ExceptionWindow.showException(data.exception, request);
+ PartKeepr.ExceptionWindow.showException(data, request);
} catch (ex) {
+
var exception = {
message: i18n("Critical Error"),
detail: i18n("The server returned a response which we were not able to interpret."),
@@ -170,7 +166,6 @@ Ext.define('PartKeepr.ServiceCall', {
msg: this.getErrorMessage(obj),
buttons: Ext.MessageBox.OK,
icon: Ext.MessageBox.ERROR
-
});
},
getErrorMessage: function (obj) {