diff options
| author | Christophe Simonis <christophe@tinyerp.com> | 2009-01-22 17:15:49 +0100 |
|---|---|---|
| committer | Christophe Simonis <christophe@tinyerp.com> | 2009-01-22 17:15:49 +0100 |
| commit | 2b6c38d36fdd185b00e432930e4808dc5fbcac4b (patch) | |
| tree | 2ff0de19cea7d8eb769aeb09a405991d7452c9f9 /bin/sql_db.py | |
| parent | 3268209d8c60a1b7a0fcbd1651c0df8a7813b421 (diff) | |
[IMP] log queries that fail
bzr revid: christophe@tinyerp.com-20090122161549-oo1boehunmtdiw7k
Diffstat (limited to 'bin/sql_db.py')
| -rw-r--r-- | bin/sql_db.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/sql_db.py b/bin/sql_db.py index 118f8e900dc..b0212ac1ea4 100644 --- a/bin/sql_db.py +++ b/bin/sql_db.py @@ -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) |
