Peewee – Database Errors
”;
Python’s DB-API standard (recommended by PEP 249) specifies the types of Exception classes to be defined by any DB-API compliant 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
”;