Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-89018: Improve documentation ofsqlite3 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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
1cee1d00e6af97b3ae237defa18086baece1c20bf57951b1c18d701e7a12a7b9fec685e0cc0d41ceb02f91494ddaa140d459dcdbd9c112a88b7293ec25c95e7c1bd6cFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1103,12 +1103,13 @@ The exception hierarchy is defined by DB-API 2.0. | ||
| .. exception:: Warning | ||
| This exception is not raised by :mod:`sqlite3`. | ||
erlend-aasland marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| ``Warning`` is a subclass of :exc:`Exception`. | ||
| .. exception:: Error | ||
| The base class of the other exceptions in this module. | ||
| Use this tocatch all errors with one single :keyword:`except` statement. | ||
| ``Error``is a subclass of :exc:`Exception`. | ||
| .. attribute:: sqlite_errorcode | ||
| @@ -1126,50 +1127,59 @@ The exception hierarchy is defined by DB-API 2.0. | ||
| .. exception:: InterfaceError | ||
| Exception raised for misuse of the low-level SQLite C API. | ||
| In other words, if this exception is raised, it is probably a bug in the | ||
erlend-aasland marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| ``sqlite3`` module. | ||
| ``InterfaceError`` is a subclass of :exc:`Error`. | ||
| .. exception:: DatabaseError | ||
| Exception raised for errors that are related to the database. | ||
| This serves the base exception for several types of database errors. | ||
erlend-aasland marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| It is only raised implicitly through the specialised variants. | ||
erlend-aasland marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| ``DatabaseError`` is a subclass of :exc:`Error`. | ||
| .. exception:: DataError | ||
| Exception raised for errorscaused byproblems with the processed data, | ||
| like numeric value out of range, and too long strings. | ||
erlend-aasland marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| ``DataError`` is a subclassof :exc:`DatabaseError`. | ||
| .. exception:: OperationalError | ||
| Exception raised for errors that are related to the database's operation, | ||
| and not necessarily under the control of the programmer. | ||
| For example, the database path is not found, | ||
| or a transaction could not be processed. | ||
| ``OperationalError`` is a subclass of :exc:`DatabaseError`. | ||
| .. exception:: IntegrityError | ||
| Exception raised when the relational integrity of the database is affected, | ||
| for example, a foreign key check fails. | ||
| ``IntegrityError`` is a subclass of :exc:`DatabaseError`. | ||
erlend-aasland marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| .. exception:: InternalError | ||
| Exception raised when SQLite encounters an internal error. | ||
| If this is raised, it may indicate that there is a problem with the runtime | ||
| SQLite library. | ||
| ``InternalError`` is a subclass of :exc:`DatabaseError`. | ||
| .. exception:: ProgrammingError | ||
| Exception raised for ``sqlite3`` API programming errors. | ||
| for example syntax errors in SQL statements, and wrong number of bindings | ||
| supplied to a query. | ||
| ``ProgrammingError`` is a subclass of :exc:`DatabaseError`. | ||
| .. exception:: NotSupportedError | ||
| Exception raised in case a method or database API is not supported by the | ||
| underlying SQLite library. For example, setting *deterministic* to | ||
| :const:`True` in :meth:`create_function`, if the underlying SQLite library | ||
erlend-aasland marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| does not support deterministic functions. | ||
| ``NotSupportedError`` is a subclass of :exc:`DatabaseError`. | ||
| .. _sqlite3-blob-objects: | ||