Revision 3349
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
530 | 530 |
if match: |
531 | 531 |
table, constraint = match.groups() |
532 | 532 |
constraint = sql_gen.Col(constraint, table) |
533 |
raise CheckException(constraint.to_str(db), None, [], e) |
|
533 |
cond = None |
|
534 |
if recover: # need auto-rollback to run constraint_cond() |
|
535 |
try: cond = constraint_cond(db, constraint) |
|
536 |
except NotImplementedError: pass |
|
537 |
raise CheckException(constraint.to_str(db), cond, [], e) |
|
534 | 538 |
|
535 | 539 |
match = re.match(r'^(?:invalid input (?:syntax|value)\b.*?' |
536 | 540 |
r'|.+? field value out of range): "(.+?)"', msg) |
Also available in: Unified diff
sql.py: run_query(): ConstraintException: Get and include the constraint condition in the exception