[Lada-commits] [PATCH] Remove erroneous error handling

Wald Commits scm-commit at wald.intevation.org
Fri Nov 18 19:56:27 CET 2016


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1479494775 -3600
# Node ID f961f94495c899530e412ce6d2ec571981ea03d3
# Parent  f3945506a4c5b468d8d0fd22c9f673ebc4a1c530
Remove erroneous error handling.

This code seems to expect any LADA validation results coming along
with an HTTP status not indicating success, which should not happen.
Instead, Ext.JSON.decode() failed because of the non-JSON responseText
resulting from other errors.

diff -r f3945506a4c5 -r f961f94495c8 app/controller/grid/ProbeList.js
--- a/app/controller/grid/ProbeList.js	Fri Nov 18 16:41:34 2016 +0100
+++ b/app/controller/grid/ProbeList.js	Fri Nov 18 19:46:15 2016 +0100
@@ -136,22 +136,8 @@
                         'Für ein erneutes Login muss die Anwendung neu geladen werden.<br/>' +
                         'Alle ungesicherten Daten gehen dabei verloren.<br/>' +
                         'Soll die Anwendung jetzt neu geladen werden?', this.reload);
-                }
-                // further error handling
-                var json = Ext.JSON.decode(response.responseText);
-                if (json) {
-                    if(json.errors.totalCount > 0 || json.warnings.totalCount > 0){
-                        formPanel.setMessages(json.errors, json.warnings);
-                    }
-                    if(json.message){
-                        Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.generic.title')
-                            +' #'+json.message,
-                            Lada.getApplication().bundle.getMsg(json.message));
-                    } else {
-                        Ext.Msg.alert(i18n.getMsg('err.msg.generic.title'),
-                            i18n.getMsg('err.msg.laf.filecreatefailed'));
-                    }
                 } else {
+                    // further error handling
                     Ext.Msg.alert(i18n.getMsg('err.msg.generic.title'),
                     i18n.getMsg('err.msg.laf.filecreatefailed'));
                 }


More information about the Lada-commits mailing list