Project

General

Profile

« Previous | Next » 

Revision 1902

sql.py: DbConn.run_query(): Also debug-log queries that produce exceptions

View differences:

sql.py
162 162
            except Exception, e:
163 163
                _add_cursor_info(e, cur)
164 164
                raise
165
            if self.log_debug != log_debug_none: # only compute msg if needed
166
                self.log_debug(strings.one_line(get_cur_query(cur)))
165
            finally:
166
                if self.log_debug != log_debug_none:# only compute msg if needed
167
                    self.log_debug(strings.one_line(get_cur_query(cur)))
167 168
            return cur
168 169
        else: return self.CacheCursor(actual_query, result)
169 170

  

Also available in: Unified diff