diff options
Diffstat (limited to 'lib/errors.py')
-rw-r--r-- | lib/errors.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/errors.py b/lib/errors.py new file mode 100644 index 0000000..1e1d8a8 --- /dev/null +++ b/lib/errors.py @@ -0,0 +1,16 @@ +"""Error classes for PostgreSQL error codes +""" + +from psycopg2._psycopg import ( # noqa + Error, Warning, DataError, DatabaseError, ProgrammingError, IntegrityError, + InterfaceError, InternalError, NotSupportedError, OperationalError, + QueryCanceledError, TransactionRollbackError) + + +_by_sqlstate = {} + + +class UndefinedTable(ProgrammingError): + pass + +_by_sqlstate['42P01'] = UndefinedTable |