diff options
| author | Christophe Simonis <christophe@tinyerp.com> | 2009-02-04 12:01:44 +0100 |
|---|---|---|
| committer | Christophe Simonis <christophe@tinyerp.com> | 2009-02-04 12:01:44 +0100 |
| commit | a55983a9369111bad5d643ea2973a5ef463b0914 (patch) | |
| tree | 1ccce37d826a6559e00c12ed16a54e4b7aad0e99 /bin/sql_db.py | |
| parent | cf6253282e67b233d0402940810a19e3e831d056 (diff) | |
[IMP] bad queries are logged in debug mode (log also the exception)
bzr revid: christophe@tinyerp.com-20090204110144-jjbt9a4itmt2vwi5
Diffstat (limited to 'bin/sql_db.py')
| -rw-r--r-- | bin/sql_db.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/sql_db.py b/bin/sql_db.py index ff9a6b0c2c6..1e88f1b66c7 100644 --- a/bin/sql_db.py +++ b/bin/sql_db.py @@ -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: |
