Project

General

Profile

« Previous | Next » 

Revision 5707

sql.py: parse_exception(): typed_name_re: Also match identifiers without quotes, such as functions in "No function matches the given name and argument types" errors. This fixes a bug where DoesNotExistExceptions could not be parsed as MissingCastExceptions when applicable because the DoesNotExistException pattern would not even match.

View differences:

lib/sql.py
558 558
    match = re.match(r'^.+? types .+? and .+? cannot be matched', msg)
559 559
    if match: raise MissingCastException('text', None, e)
560 560
    
561
    typed_name_re = r'^(\S+) "(.+?)"(?: of relation ".+?")?'
561
    typed_name_re = r'^(\S+) "?(.+?)"?(?: of relation ".+?")?'
562 562
    
563 563
    match = re.match(typed_name_re+r'.*? already exists', msg)
564 564
    if match:

Also available in: Unified diff