Author: reinhard
Date: 2005-08-03 09:19:23 -0500 (Wed, 03 Aug 2005)
New Revision: 7776
Modified:
trunk/gnue-common/src/datasources/Exceptions.py
trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
Log:
Explicit exception when record is not found on requery.
Modified: trunk/gnue-common/src/datasources/Exceptions.py
===================================================================
--- trunk/gnue-common/src/datasources/Exceptions.py 2005-08-03 14:05:53 UTC
(rev 7775)
+++ trunk/gnue-common/src/datasources/Exceptions.py 2005-08-03 14:19:23 UTC
(rev 7776)
@@ -201,6 +201,19 @@
# -----------------------------------------------------------------------------
+# Record not found on requery
+# -----------------------------------------------------------------------------
+
+class RecordNotFoundError (errors.SystemError):
+ """
+ Record not found on requery. This shouldn't happen.
+ """
+ def __init__ (self):
+ errors.SystemError (self,
+ u_("Record not found on attempt to requery changed record"))
+
+
+# -----------------------------------------------------------------------------
#
# -----------------------------------------------------------------------------
Modified: trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
2005-08-03 14:05:53 UTC (rev 7775)
+++ trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
2005-08-03 14:19:23 UTC (rev 7776)
@@ -547,7 +547,7 @@
result [fields [i]] = row [i]
return result
else:
- return None
+ raise Exceptions.RecordNotFoundError
# ---------------------------------------------------------------------------
_______________________________________________
Commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue