Revision 5717
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
540 | 540 |
raise CheckException(constraint.to_str(db), cond, [], e) |
541 | 541 |
|
542 | 542 |
match = re.match(r'^(?:invalid input (?:syntax|value)\b.*?' |
543 |
r'|.+? out of range): "(.+?)"', msg)
|
|
543 |
r'|.+? out of range)(?:: "(.+?)")?', msg)
|
|
544 | 544 |
if match: |
545 | 545 |
value, = match.groups() |
546 |
raise InvalidValueException(strings.to_unicode(value), e) |
|
546 |
value = util.do_ignore_none(strings.to_unicode, value) |
|
547 |
raise InvalidValueException(value, e) |
|
547 | 548 |
|
548 | 549 |
match = re.match(r'^column "(.+?)" is of type (.+?) but expression ' |
549 | 550 |
r'is of type', msg) |
Also available in: Unified diff
sql.py: parse_exception(): InvalidValueException: Also match exceptions which don't provide a specific value but just indicate that a value was invalid, such as PL/Python's "day is out of range for month"