[IMP] log queries that fail
bzr revid: christophe@tinyerp.com-20090122161549-oo1boehunmtdiw7k
This commit is contained in:
parent
3268209d8c
commit
2b6c38d36f
|
@ -113,7 +113,11 @@ class Cursor(object):
|
|||
if self.sql_log:
|
||||
now = mdt.now()
|
||||
|
||||
res = self._obj.execute(query, params)
|
||||
try:
|
||||
res = self._obj.execute(query, params)
|
||||
except:
|
||||
log("bad query: %s" % self._obj.query, netsvc.LOG_ERROR)
|
||||
raise
|
||||
|
||||
if self.sql_log:
|
||||
log("query: %s" % self._obj.query)
|
||||
|
|
Loading…
Reference in New Issue