Revision 300
Added by Aaron Marcuse-Kubitza almost 13 years ago
sql.py | ||
---|---|---|
4 | 4 |
import re |
5 | 5 |
import sys |
6 | 6 |
|
7 |
import ex |
|
7 |
import exc
|
|
8 | 8 |
import util |
9 | 9 |
|
10 | 10 |
def get_cur_query(cur): |
... | ... | |
12 | 12 |
elif hasattr(cur, '_last_executed'): return cur._last_executed |
13 | 13 |
else: return None |
14 | 14 |
|
15 |
def _add_cursor_info(e, cur): ex.add_msg(e, 'query: '+get_cur_query(cur)) |
|
15 |
def _add_cursor_info(e, cur): exc.add_msg(e, 'query: '+get_cur_query(cur))
|
|
16 | 16 |
|
17 | 17 |
class NameException(Exception): pass |
18 | 18 |
|
19 |
class DbException(ex.ExceptionWithCause): |
|
19 |
class DbException(exc.ExceptionWithCause):
|
|
20 | 20 |
def __init__(self, msg, cause=None, cur=None): |
21 |
ex.ExceptionWithCause.__init__(self, msg, cause) |
|
21 |
exc.ExceptionWithCause.__init__(self, msg, cause)
|
|
22 | 22 |
if cur != None: _add_cursor_info(self, cur) |
23 | 23 |
|
24 | 24 |
class ExceptionWithColumn(DbException): |
Also available in: Unified diff
Renamed ex.py to exc.py