[IMP] bad queries are logged in debug mode (log also the exception)

bzr revid: christophe@tinyerp.com-20090204110144-jjbt9a4itmt2vwi5
This commit is contained in:
Christophe Simonis
2009-02-04 12:01:44 +01:00
parent cf6253282e
commit a55983a936
+3 -2
View File
@@ -116,8 +116,9 @@ class Cursor(object):
try:
res = self._obj.execute(query, params)
except:
log("bad query: %s" % self._obj.query, netsvc.LOG_ERROR)
except Exception, e:
log("bad query: %s" % self._obj.query)
log(e)
raise
if self.sql_log: