aboutsummaryrefslogtreecommitdiffhomepage
path: root/bindings/python/docs
diff options
context:
space:
mode:
authorGravatar Sebastian Spaeth <Sebastian@SSpaeth.de>2011-10-05 16:58:13 +0200
committerGravatar Sebastian Spaeth <Sebastian@SSpaeth.de>2011-10-05 16:58:13 +0200
commit2b43a65c1c2049f94a6787925addd5b6e4040453 (patch)
tree40bed5eb24ea0218a29127b846e017cbeeb076c5 /bindings/python/docs
parent05926adf73e7b1bad0faa4a0a5514d554353cdaa (diff)
python: Add the new exception types in the API documentation
as they should be documented... Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Diffstat (limited to 'bindings/python/docs')
-rw-r--r--bindings/python/docs/source/status_and_errors.rst28
1 files changed, 25 insertions, 3 deletions
diff --git a/bindings/python/docs/source/status_and_errors.rst b/bindings/python/docs/source/status_and_errors.rst
index 1d74ba17..bc0d0d23 100644
--- a/bindings/python/docs/source/status_and_errors.rst
+++ b/bindings/python/docs/source/status_and_errors.rst
@@ -15,9 +15,31 @@ Some methods return a status, indicating if an operation was successful and what
:exc:`NotmuchError` -- A Notmuch execution error
------------------------------------------------
-Whenever an error occurs, we throw a special Exception:
+Whenever an error occurs, we throw a special Exception :exc:`NotmuchError`, or a more fine grained Exception which is derived from it. This means it is always safe to check for NotmuchErrors if you want to catch all errors. If you are interested in more fine grained exceptions, you can use those below.
.. autoexception:: NotmuchError
- :members:
- This execption inherits directly from :exc:`Exception` and is raised on errors during the notmuch execution.
+The following exceptions are all directly derived from NotmuchError. Each of them corresponds to a specific :class:`notmuch.STATUS` value. You can either check the :attr:`status` attribute of a NotmuchError to see if a specific error has occurred, or you can directly check for the following Exception types:
+
+.. autoexception:: OutOfMemoryError(message=None)
+ :members:
+.. autoexception:: ReadOnlyDatabaseError(message=None)
+ :members:
+.. autoexception:: XapianError(message=None)
+ :members:
+.. autoexception:: FileError(message=None)
+ :members:
+.. autoexception:: FileNotEmailError(message=None)
+ :members:
+.. autoexception:: DuplicateMessageIdError(message=None)
+ :members:
+.. autoexception:: NullPointerError(message=None)
+ :members:
+.. autoexception:: TagTooLongError(message=None)
+ :members:
+.. autoexception:: UnbalancedFreezeThawError(message=None)
+ :members:
+.. autoexception:: UnbalancedAtomicError(message=None)
+ :members:
+.. autoexception:: NotInitializedError(message=None)
+ :members: