Revision 5683
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
573 | 573 |
match = re.match(typed_name_re+r' does not exist', msg) |
574 | 574 |
if match: |
575 | 575 |
type_, name = match.groups() |
576 |
if type_ == 'function': |
|
577 |
match = re.match(r'^(.+?)\(([^,)]+).*\)$', name) |
|
578 |
if match: |
|
579 |
function_name, param0_type = match.groups() |
|
580 |
if msg.split('\n')[1].find(function_name) >= 0: # also on line 2 |
|
581 |
# not found only because of a missing cast |
|
582 |
raise MissingCastException(param0_type, function_name, e) |
|
576 | 583 |
raise DoesNotExistException(type_, name, e) |
577 | 584 |
|
578 | 585 |
raise # no specific exception raised |
Also available in: Unified diff
sql.py: parse_exception(): DoesNotExistException: If item not found was a function and not found only because of a missing cast, raise MissingCastException instead. This should allow automatic casts to be added on function parameters as well as table columns.