diff -r 1002a1bdc5b1 Doc/library/sqlite3.rst --- a/Doc/library/sqlite3.rst Sun Aug 07 10:19:20 2016 -0700 +++ b/Doc/library/sqlite3.rst Mon Aug 08 08:35:34 2016 +0200 @@ -113,6 +113,40 @@ :pep:`249` - Database API Specification 2.0 PEP written by Marc-André Lemburg. +.. _sqlite3-exceptions: + +Exceptions +---------- + + +.. exception:: Warning + + Exception raised for important warnings like data truncations + while inserting, etc. It is a subclass of :exc:`Exception`. + +.. exception:: Error + + Exception that is the base class of all other error + exceptions. You can use this to catch all errors with one single + ``except`` statement. Warnings are not considered errors and thus + should not use this class as base. It is a subclass of :exc:`Exception`. + +.. exception:: DatabaseError + + Exception raised for errors that are related to the database. It + is a subclass of :exc:`Error` + +.. exception:: IntegrityError + + Exception raised when the relational integrity of the database is + affected, e.g. a foreign key check fails. It is a subclass + of :exc:`DatabaseError`. + +.. exception:: ProgrammingError + + Exception raised for programming errors, e.g. table not found or + already exists, syntax error in the SQL statement, wrong number of + parameters specified, etc. It is a subclass of :exc:`DatabaseError`. .. _sqlite3-module-contents: