]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python-cffi/notmuch2/_errors.py
Merge tag '0.31.4'
[notmuch] / bindings / python-cffi / notmuch2 / _errors.py
index 1c88763b95d1daa22f3d094c640360ec34149b04..65064d4eda470cf8f90a25bf38f0c75bf53ac62f 100644 (file)
@@ -50,6 +50,10 @@ class NotmuchError(Exception):
                 PathError,
             capi.lib.NOTMUCH_STATUS_ILLEGAL_ARGUMENT:
                 IllegalArgumentError,
+            capi.lib.NOTMUCH_STATUS_NO_CONFIG:
+                NoConfigError,
+            capi.lib.NOTMUCH_STATUS_DATABASE_EXISTS:
+                DatabaseExistsError,
         }
         return types[status]
 
@@ -94,10 +98,11 @@ class UnsupportedOperationError(NotmuchError): pass
 class UpgradeRequiredError(NotmuchError): pass
 class PathError(NotmuchError): pass
 class IllegalArgumentError(NotmuchError): pass
-
+class NoConfigError(NotmuchError): pass
+class DatabaseExistsError(NotmuchError): pass
 
 class ObjectDestroyedError(NotmuchError):
-    """The object has already been destoryed and it's memory freed.
+    """The object has already been destroyed and it's memory freed.
 
     This occurs when :meth:`destroy` has been called on the object but
     you still happen to have access to the object.  This should not