.. autoattribute:: diag
.. autoattribute:: sqlstate
- The code of the error, if defined.
+ The code of the error, if received from the server.
- This is a class attribute defined for all the
- :ref:`sqlstate-exceptions` classes, `!None` for the base classes.
+ This attribute is also available as class attribute on the
+ :ref:`sqlstate-exceptions` classes.
.. autoexception:: Warning()
.. autoexception:: InterfaceError()
the documentation`__, converted to CamelCase: e.g. the error 22012,
``division_by_zero`` is exposed by this module as the class `!DivisionByZero`.
There is a handful of... exceptions to this rule, required for disambiguate
-name clashes: please refer to the table below for all the classes defined.
+name clashes: please refer to the :ref:`table below <exceptions-list>` for all
+the classes defined.
.. __: https://www.postgresql.org/docs/current/errcodes-appendix.html#ERRCODES-TABLE
Every exception class is a subclass of one of the :ref:`standard DB-API
-exception <dbapi-exceptions>` and expose the `Error` interface.
+exception <dbapi-exceptions>`, thus exposing the `~psycopg.Error` interface.
.. autofunction:: lookup
locked = True
-These are all the classes defined and the DBAPI exception they derive from:
+.. _exceptions-list:
+
+List of known exceptions
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+The following are all the SQLSTATE-related error classed defined by this
+module, together with the base DBAPI exception they derive from.
.. autogenerated: start