8000 gh-89018: Improve documentation of `sqlite3` exceptions by erlend-aasland · Pull Request #27645 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-89018: Improve documentation of sqlite3 exceptions #27645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jun 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

< 10000 fieldset> Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
WIP
  • Loading branch information
Erlend E. Aasland committed Apr 12, 2022
commit 86baecee7ddef8bdc2eecb578a2e04848d22bb32
15 changes: 8 additions & 7 deletions Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1006,22 +1006,18 @@ Now we plug :class:`Row` in::
Exceptions
----------

The exception hierarchy is defined by DB-API 2.0.

.. exception:: Warning

Exception raised for important warnings like data truncations while
inserting, etc. It is a subclass of :exc:`Exception`.
This exception is not raised by :mod:`sqlite3`.

.. exception:: Error

The base class of the other error exceptions in this module. Use this to
catch all errors with one single :keyword:`except` statement. :exc:`Error`
is a subclass of :exc:`Exception`.

.. exception:: InterfaceError

Exception raised for errors that are related to the database interface
rather than the database itself. It is a subclass of :exc:`Error`.

.. attribute:: sqlite_errorcode

The numeric error code from the
Expand All @@ -1036,6 +1032,11 @@ Exceptions

.. versionadded:: 3.11

.. exception:: InterfaceError

Exception raised for errors that are related to the database interface
rather than the database itself. It is a subclass of :exc:`Error`.

.. exception:: DatabaseError

Exception raised for errors that are related to the database. It is a
Expand Down
0