dabo Commit
Revision 3229
Date: 2007-07-06 06:17:33 -0700 (Fri, 06 Jul 2007)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/3229

Changed:
U   trunk/dabo/db/dCursorMixin.py

Log:
Added some dbActivityLog entries for a couple of database exceptions.


Diff:
Modified: trunk/dabo/db/dCursorMixin.py
===================================================================
--- trunk/dabo/db/dCursorMixin.py       2007-07-05 23:56:43 UTC (rev 3228)
+++ trunk/dabo/db/dCursorMixin.py       2007-07-06 13:17:33 UTC (rev 3229)
@@ -217,7 +217,8 @@
                                try:
                                        return pythonType(field_val)
                                except Exception, e:
-                                       pass
+                                       
dabo.infoLog.write(_("_correctFieldType() failed for field: '%s'; value: '%s'; 
type: '%s'") %
+                                                       field_name, field_val, 
type(field_val))
 
                # Do the unicode conversion last:
                if isinstance(field_val, str) and self._convertStrToUnicode:
@@ -1069,11 +1070,13 @@
                        except dException.DBQueryException, e:
                                # Error was raised. Exit and rollback the 
changes if
                                # this object started the transaction.
+                               dabo.dbActivityLog.write(_("DBQueryException 
encountered in save(): %s") % e)
                                if useTransaction:
                                        self.rollbackTransaction()
                                raise dException.DBQueryException, e
                        except StandardError, e:
                                if "connect" in str(e).lower():
+                                       dabo.dbActivityLog.write(_("Connection 
Lost exception encountered in saverow(): %s") % e)
                                        raise 
dException.ConnectionLostException, e
                                else:
                                        # Error was raised. Exit and rollback 
the changes if




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to