Project

General

Profile

« Previous | Next » 

Revision 2188

sql.py: Parse "function already exists" errors as DuplicateFunctionException

View differences:

sql.py
51 51

  
52 52
class DuplicateTableException(ExceptionWithName): pass
53 53

  
54
class DuplicateFunctionException(ExceptionWithName): pass
55

  
54 56
class EmptyRowException(DbException): pass
55 57

  
56 58
##### Warnings
......
331 333
        if match: raise NullValueException([match.group(1)], e)
332 334
        match = re.search(r'relation "(\w+)" already exists', msg)
333 335
        if match: raise DuplicateTableException(match.group(1), e)
336
        match = re.search(r'function "(\w+)" already exists', msg)
337
        if match: raise DuplicateFunctionException(match.group(1), e)
334 338
        raise # no specific exception raised
335 339

  
336 340
##### Basic queries

Also available in: Unified diff