Revision 2535
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
389 | 389 |
|
390 | 390 |
match = re.search(r'\b(?:invalid input (?:syntax|value)\b.*?' |
391 | 391 |
r'|date/time field value out of range): "(.+?)"\n' |
392 |
r'(?:(?s).*?)\bfunction "(.+?)".*?\bat assignment', msg)
|
|
392 |
r'(?:(?s).*?)\bfunction "(.+?)"', msg) |
|
393 | 393 |
if match: |
394 | 394 |
value, name = match.groups() |
395 | 395 |
raise FunctionValueException(name, strings.to_unicode(value), e) |
... | ... | |
1019 | 1019 |
log_debug('Missing mapping for NOT NULL column '+out_col) |
1020 | 1020 |
remove_all_rows() |
1021 | 1021 |
else: remove_rows(in_col, None) |
1022 |
except FunctionValueException, e: |
|
1023 |
log_exc(e) |
|
1024 |
|
|
1025 |
assert e.name == out_table.name |
|
1026 |
out_col = 'value' # assume function param was named "value" |
|
1027 |
invalid2null(mapping[out_col], e.value) |
|
1022 |
#except FunctionValueException, e:
|
|
1023 |
# log_exc(e)
|
|
1024 |
# |
|
1025 |
# assert e.name == out_table.name
|
|
1026 |
# out_col = 'value' # assume function param was named "value"
|
|
1027 |
# invalid2null(mapping[out_col], e.value)
|
|
1028 | 1028 |
except MissingCastException, e: |
1029 | 1029 |
log_exc(e) |
1030 | 1030 |
|
Also available in: Unified diff
sql.py: run_query(): FunctionValueException: Expanded parsing to include regular function calls, not just relational functions' trigger functions. put_table(): Disabled FunctionValueException handling because this expands FunctionValueException beyond what put_table() could handle.