commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r7722 - in trunk: gnue-common gnue-forms/src


From: reinhard
Subject: [gnue] r7722 - in trunk: gnue-common gnue-forms/src
Date: Tue, 12 Jul 2005 12:46:38 -0500 (CDT)

Author: reinhard
Date: 2005-07-12 12:46:37 -0500 (Tue, 12 Jul 2005)
New Revision: 7722

Modified:
   trunk/gnue-common/BUGS
   trunk/gnue-forms/src/GFForm.py
Log:
Jump to offending block on exceptions (as precisely as possible): currently,
it's always the master, even if a detail was causing the exception.


Modified: trunk/gnue-common/BUGS
===================================================================
--- trunk/gnue-common/BUGS      2005-07-12 17:16:34 UTC (rev 7721)
+++ trunk/gnue-common/BUGS      2005-07-12 17:46:37 UTC (rev 7722)
@@ -1,13 +1,15 @@
 datasources
 -----------
 
-* Some drivers are broken for time fields (time without date) (due to bugs in
-  the DBSIG2 module)
-* Different drivers return different Python datatypes for the same type of row
-  (for example for date, time, and datetime fields) (due to different behavior
-  of the DBSIG2 module)
+* When GDataSource.postAll() raises an exception, there is no way for the
+  caller to determine which ResultSet caused the error - the master or one of
+  the details.
 
+* Even worse for appserver backend: if an exception happens on commit (i.e.
+  OnValidate fails for any of the changed objects), the caller cannot determine
+  anything about the offending record.
 
+
 rpc
 ---
 

Modified: trunk/gnue-forms/src/GFForm.py
===================================================================
--- trunk/gnue-forms/src/GFForm.py      2005-07-12 17:16:34 UTC (rev 7721)
+++ trunk/gnue-forms/src/GFForm.py      2005-07-12 17:46:37 UTC (rev 7722)
@@ -645,6 +645,7 @@
       return _('Form is readonly')
     
     message = None
+    newBlock = self._currentBlock       # block to jump to after commit
     self.dispatchEvent ('beginWAIT', _form = self)
 
     try:
@@ -659,7 +660,7 @@
 
         except AbortRequest:
           gDebug (5, "Trigger form Pre-Commit threw a AbortRequest!")
-          return _("Form trigger returned error")
+          message = u_("Form trigger returned error")
 
 
         # Process the commit on all blocks
@@ -670,7 +671,13 @@
 
           except AbortRequest:
             gDebug (5, "Trigger block Pre-Commit threw a AbortRequest!")
-            return _("Block trigger returned error")
+            message = u_("Block trigger returned error")
+            # jump to offending block
+            newBlock = block
+          except:
+            # jump to offending block
+            newBlock = block
+            raise
 
         try:
           # Now do the real commit () on the backend connections (only once per
@@ -707,7 +714,7 @@
     finally:
       # Make sure the current block still has the focus, even if an exception
       # occured during commit or in a trigger
-      self.findAndChangeFocus (self._currentBlock)
+      self.findAndChangeFocus (newBlock)
       self.dispatchEvent ('endWAIT', _form = self)
 
     gLeave (4)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]