summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-08-24 21:45:36 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-08-24 21:45:36 (GMT)
commitc7876464e7b3ea0fb118afa1ec13d1849f7fa42d (patch)
treef7994043ebd045e203b4d9646a24743fd54e6c9c /Doc
parentdd30830d8ab9a032eeb0f2b6fe53f55e4f18be3c (diff)
parented789f9cf9586d94e85115bb516a2ab6b9a2f668 (diff)
downloadcpython-c7876464e7b3ea0fb118afa1ec13d1849f7fa42d.zip
cpython-c7876464e7b3ea0fb118afa1ec13d1849f7fa42d.tar.gz
cpython-c7876464e7b3ea0fb118afa1ec13d1849f7fa42d.tar.bz2
Issue #6057: Merge from 3.5
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/sqlite3.rst34
1 files changed, 32 insertions, 2 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 2cd823e..e53efda 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -542,7 +542,7 @@ Cursor Objects
.. literalinclude:: ../includes/sqlite3/execute_1.py
:meth:`execute` will only execute a single SQL statement. If you try to execute
- more than one statement with it, it will raise an ``sqlite3.Warning``. Use
+ more than one statement with it, it will raise an :exc:`.Warning`. Use
:meth:`executescript` if you want to execute multiple SQL statements with one
call.
@@ -605,7 +605,7 @@ Cursor Objects
Close the cursor now (rather than whenever ``__del__`` is called).
- The cursor will be unusable from this point forward; a ``ProgrammingError``
+ The cursor will be unusable from this point forward; a :exc:`ProgrammingError`
exception will be raised if any operation is attempted with the cursor.
.. attribute:: rowcount
@@ -726,6 +726,36 @@ Now we plug :class:`Row` in::
35.14
+.. _sqlite3-exceptions:
+
+Exceptions
+----------
+
+.. exception:: Warning
+
+ A subclass of :exc:`Exception`.
+
+.. exception:: Error
+
+ The base class of the other exceptions in this module. It is a subclass
+ of :exc:`Exception`.
+
+.. exception:: DatabaseError
+
+ Exception raised for errors that are related to the database.
+
+.. 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-types:
SQLite and Python types