Project

General

Profile

« Previous | Next » 

Revision 9757

bugfix: lib/sql.py: parse_exception(): make_DuplicateKeyException(): handle nested exceptions (which should never be generated, but may be in case of sql.py bugs such as wiki.vegpath.org/To_Do#Fixes > #1) by printing the nested exception and then rethrowing the original exception, so that the original exception does not get lost and still ends up at the end of the program's output, to enable debugging

View differences:

sql.py
540 540
                cols = index_cols(db, constraint)
541 541
                cond = index_cond(db, constraint)
542 542
            except NotImplementedError: pass
543
            except DatabaseErrors, e2: # e.g. "current transaction is aborted"
544
                exc.print_ex(e2)
545
                raise e
543 546
        return DuplicateKeyException(constraint, cond, cols, e)
544 547
    
545 548
    match = re.match(r'^duplicate key value violates unique constraint "(.+?)"',

Also available in: Unified diff