English 中文(简体)
Peewee - Database Errors
  • 时间:2024-09-17

Peewee - Database Errors


Previous Page Next Page  

Python’s DB-API standard (recommended by PEP 249) specifies the types of Exception classes to be defined by any DB-API comppant module (such as pymysql, pyscopg2, etc.).

Peewee API provides easy-to-use wrappers for these exceptions. PeeweeException is the base classes from which following Exception classes has been defined in Peewee API −

    DatabaseError

    DataError

    IntegrityError

    InterfaceError

    InternalError

    NotSupportedError

    OperationalError

    ProgrammingError

Instead of DB-API specific exceptions to be tried, we can implement above ones from Peewee.

Advertisements