Revision 3507
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql_io.py | ||
---|---|---|
75 | 75 |
|
76 | 76 |
'''+self.return_.to_str(db) |
77 | 77 |
|
78 |
def data_exception_handler(db, *args, **kw_args):
|
|
78 |
def data_exception_handler(*args, **kw_args): |
|
79 | 79 |
'''Handles a data_exception by saving it or converting it to a warning. |
80 | 80 |
For params, see ExcToErrorsTable(). |
81 | 81 |
''' |
... | ... | |
107 | 107 |
# Create function definition |
108 | 108 |
modifiers = 'STRICT' |
109 | 109 |
if not save_errors: modifiers = 'IMMUTABLE '+modifiers |
110 |
handler = data_exception_handler(db, 'RETURN NULL;\n', srcs, errors_table)
|
|
110 |
handler = data_exception_handler('RETURN NULL;\n', srcs, errors_table) |
|
111 | 111 |
body = sql_gen.CustomCode(handler.to_str(db, '''\ |
112 | 112 |
/* The explicit cast to the return type is needed to make the cast happen |
113 | 113 |
inside the try block. (Implicit casts to the return type happen at the end |
Also available in: Unified diff
sql_io.py: data_exception_handler(): Removed no longer needed db param