From ad2872f5fd4fb145685007eaa03d90ae4505af69 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Mon, 1 Aug 2022 02:22:09 -0700 Subject: gh-95273: Clarify when sqlite_* attributes are added to sqlite3 exceptions (GH-95523) (cherry picked from commit 1e6b63542e4856436c5c12148a6608ef9d148b71) Co-authored-by: Erlend Egeberg Aasland --- Doc/library/sqlite3.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 332e3b0..e150baa 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -1310,6 +1310,9 @@ The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`). Use this to catch all errors with one single :keyword:`except` statement. ``Error`` is a subclass of :exc:`Exception`. + If the exception originated from within the SQLite library, + the following two attributes are added to the exception: + .. attribute:: sqlite_errorcode The numeric error code from the -- cgit v0.12