Source code for sqlobject.dberrors

"""dberrors: database exception classes for SQLObject.

   These classes are dictated by the DB API v2.0, see:
   https://wiki.python.org/moin/DatabaseProgramming
"""

from sqlobject.compat import PY2

if not PY2:
    StandardError = Exception


[docs]class Error(StandardError): pass
[docs]class Warning(StandardError): pass
[docs]class InterfaceError(Error): pass
[docs]class DatabaseError(Error): pass
[docs]class InternalError(DatabaseError): pass
[docs]class OperationalError(DatabaseError): pass
[docs]class ProgrammingError(DatabaseError): pass
[docs]class IntegrityError(DatabaseError): pass
[docs]class DataError(DatabaseError): pass
[docs]class NotSupportedError(DatabaseError): pass
[docs]class DuplicateEntryError(IntegrityError): pass