[Mpuls-commits] r1677 - in wasko/branches/2.0: . waskaweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Feb 22 17:06:39 CET 2010


Author: bh
Date: 2010-02-22 17:06:38 +0100 (Mon, 22 Feb 2010)
New Revision: 1677

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/waskaweb/model/case.py
Log:
* waskaweb/model/case.py (CaseFactory._updateMasterOnCreate):
Simplify exception handling.  The SetDataException is still
caught, though, but it's logged at least.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-02-22 15:57:09 UTC (rev 1676)
+++ wasko/branches/2.0/ChangeLog	2010-02-22 16:06:38 UTC (rev 1677)
@@ -1,5 +1,11 @@
 2010-02-22  Bernhard Herzog  <bh at intevation.de>
 
+	* waskaweb/model/case.py (CaseFactory._updateMasterOnCreate):
+	Simplify exception handling.  The SetDataException is still
+	caught, though, but it's logged at least.
+
+2010-02-22  Bernhard Herzog  <bh at intevation.de>
+
 	* waskaweb/model/case.py (SessionCase.setData)
 	(SessionCase.toFormData): The conversion from AliasDescription to
 	Field was incomplete. Fix it.

Modified: wasko/branches/2.0/waskaweb/model/case.py
===================================================================
--- wasko/branches/2.0/waskaweb/model/case.py	2010-02-22 15:57:09 UTC (rev 1676)
+++ wasko/branches/2.0/waskaweb/model/case.py	2010-02-22 16:06:38 UTC (rev 1677)
@@ -412,17 +412,10 @@
             session['uncommitted_fields'] = instance_tree.commit()
             session.save()
         except SetDataException, err:
-            # Do nothing than setting the status message. In the future the
-            # exception can be used to fill out the form again with htmlfill,
-            # which will clean up the renderer code a lot! But this is for the
-            # future
-            #error_status(_('Error while saving data'))
-            pass
-        except:
-            print traceback.print_exc()
-            #error_status(_('Error while saving data'))
-            raise # Saving failed with unknown reason! Raise exception ->
-                  # should result in a bugreport dialog if enabled.
+            # FIXME: We should handle this exception in some way.
+            # For now, though, it's better to log it instead of silently
+            # suppressing it.
+            log.exception("SetDataException in _updateMasterOnCreate ignored")
 
     def _initNewCase(self, id):
         conn, cur = None, None



More information about the Mpuls-commits mailing list