Skip to content

PEP 249 exceptions: support DatabaseError subclasses whenever possible #35

@fdcastel

Description

@fdcastel

From PEP 249:

DataError
Exception raised for errors that are due to problems with the processed data like division by zero, numeric value out of range, etc.

IntegrityError
Exception raised when the relational integrity of the database is affected, e.g. a foreign key check fails.

InternalError
Exception raised when the database encounters an internal error, e.g. the cursor is not valid anymore, the transaction is out of sync, etc.

ProgrammingError
Exception raised for programming errors, e.g. table not found or already exists, syntax error in the SQL statement, wrong number of parameters specified, etc.

NotSupportedError
Exception raised in case a method or database API was used which is not supported by the database, e.g. requesting a .rollback() on a connection that does not support transaction or has transactions turned off.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions