[Mpuls-commits] r3130 - in base/trunk: . mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Jul 2 21:13:23 CEST 2010


Author: bh
Date: 2010-07-02 21:13:21 +0200 (Fri, 02 Jul 2010)
New Revision: 3130

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/model/appointment.py
Log:
* mpulsweb/model/appointment.py (Appointment.store): Use
log.exception instead of log.error to log exceptions and add a log
message


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-07-02 18:48:31 UTC (rev 3129)
+++ base/trunk/ChangeLog	2010-07-02 19:13:21 UTC (rev 3130)
@@ -1,5 +1,11 @@
 2010-07-02  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/model/appointment.py (Appointment.store): Use
+	log.exception instead of log.error to log exceptions and add a log
+	message
+
+2010-07-02  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/model/document.py (deleteDocument): Use DB.execute to
 	execute the database transactions
 

Modified: base/trunk/mpulsweb/model/appointment.py
===================================================================
--- base/trunk/mpulsweb/model/appointment.py	2010-07-02 18:48:31 UTC (rev 3129)
+++ base/trunk/mpulsweb/model/appointment.py	2010-07-02 19:13:21 UTC (rev 3130)
@@ -402,8 +402,9 @@
             cur.execute(self.store_sql, fields)
             conn.commit()
             return True
-        except Exception, e:
-            log.error(e)
+        except Exception:
+            log.exception("Error while storing appointment %r for case %r"
+                          % (self.id, self.case_id))
         finally:
             db.recycleConnection(conn, cur)
         return False



More information about the Mpuls-commits mailing list