[Lada-commits] [PATCH 6 of 9] Made the unhandled Errors more talkativew

Wald Commits scm-commit at wald.intevation.org
Thu Mar 26 17:31:48 CET 2015


# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1427383584 -3600
# Node ID b0f1dcdf981d0bc4ea3d5f590a64b82ce35139b2
# Parent  d6ef146e1a9fe39cb9f036c5a83a9634b99a6016
Made the unhandled Errors more talkativew

diff -r d6ef146e1a9f -r b0f1dcdf981d app/view/window/MessungEdit.js
--- a/app/view/window/MessungEdit.js	Thu Mar 26 16:24:13 2015 +0100
+++ b/app/view/window/MessungEdit.js	Thu Mar 26 16:26:24 2015 +0100
@@ -98,8 +98,10 @@
         this.clearMessages();
         var that = this;
         Ext.ClassManager.get('Lada.model.Messung').load(this.record.get('id'), {
-            failure: function(record) {
+            failure: function(record, response) {
                 // TODO
+                console.log("An unhandled Failure occured. See following Response and Record");
+                console.log(response);
                 console.log(record);
             },
             success: function(record, response) {
@@ -107,7 +109,10 @@
                 if (this.probe.get('treeModified') < record.get('treeModified')) {
                     Ext.Msg.show({
                         title: 'Probe nicht aktuell!',
-                        msg: 'Die zugehörige Probe wurde verändert.\nMöchten Sie zu der Probe zurückkehren und neu laden?\nOhne das erneute Laden der Probe wird das Speichern der Messung nicht möglich sein.',
+                        msg: 'Die zugehörige Probe wurde verändert.\n'+
+                            'Möchten Sie zu der Probe zurückkehren und neu laden?\n'+
+                            'Ohne das erneute Laden der Probe wird das Speichern'+
+                            ' der Messung nicht möglich sein.',
                         buttons: Ext.Msg.OKCANCEL,
                         icon: Ext.Msg.WARNING,
                         closable: false,
@@ -132,7 +137,6 @@
             },
             scope: this
         });
-        console.log(this.record);
         if (this.record.get('readonly') == true){
             this.disableForm();
         }
diff -r d6ef146e1a9f -r b0f1dcdf981d app/view/window/ProbeEdit.js
--- a/app/view/window/ProbeEdit.js	Thu Mar 26 16:24:13 2015 +0100
+++ b/app/view/window/ProbeEdit.js	Thu Mar 26 16:26:24 2015 +0100
@@ -112,7 +112,10 @@
         Ext.ClassManager.get('Lada.model.Probe').load(this.record.get('id'), {
             failure: function(record, action) {
                 // TODO
-            },
+                console.log("An unhandled Failure occured. See following Response and Record");
+                console.log(response);
+                console.log(record);
+             },
             success: function(record, response) {
                 this.down('probeform').setRecord(record);
                 this.record = record;
@@ -131,6 +134,8 @@
 
             //The Owner of a Probe is always allowed to add a Messung.
             // ToDo ist it required to check if a Status exists?
+            // ToDo this doesn't work here because the owner is unknown when this code
+            //   is executed.
             if (this.record.get('owner') == true){
                 //allow to add Messungen
                 this.down('fset[name=messungen]').down('messunggrid').down('button[name=add]').enable();


More information about the Lada-commits mailing list