Project

General

Profile

« Previous | Next » 

Revision 5708

sql.py: parse_exception(): function MissingCastException: Fixed bug where the 1st param's type in the exception's function signature is not actually the type the argument needs to have, because this is just the argument's current type

View differences:

sql.py
574 574
    if match:
575 575
        type_, name = match.groups()
576 576
        if type_ == 'function':
577
            match = re.match(r'^"?(.+?)"?\((?:.+? := )?([^,)]+).*\)$', name)
577
            match = re.match(r'^"?(.+?)"?\(.*\)$', name)
578 578
            if match:
579
                function_name, param0_type = match.groups()
579
                function_name, = match.groups()
580 580
                if msg.split('\n')[1].find(function_name) >= 0: # also on line 2
581 581
                    # not found only because of a missing cast
582
                    raise MissingCastException(param0_type, function_name, e)
582
                    raise MissingCastException('text', function_name, e)
583 583
        raise DoesNotExistException(type_, name, e)
584 584
    
585 585
    raise # no specific exception raised

Also available in: Unified diff