]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python-cffi/notmuch2/_errors.py
lib: add new status code for query syntax errors.
[notmuch] / bindings / python-cffi / notmuch2 / _errors.py
index 9301073ed7668836f74c68f1cc0f3503b772af46..f55cc96b53bf44ba69cbbd0b5774626fc8006632 100644 (file)
@@ -56,6 +56,8 @@ class NotmuchError(Exception):
                 NoDatabaseError,
             capi.lib.NOTMUCH_STATUS_DATABASE_EXISTS:
                 DatabaseExistsError,
+            capi.lib.NOTMUCH_STATUS_BAD_QUERY_SYNTAX:
+                QuerySyntaxError,
         }
         return types[status]
 
@@ -103,6 +105,7 @@ class IllegalArgumentError(NotmuchError): pass
 class NoConfigError(NotmuchError): pass
 class NoDatabaseError(NotmuchError): pass
 class DatabaseExistsError(NotmuchError): pass
+class QuerySyntaxError(NotmuchError): pass
 
 class ObjectDestroyedError(NotmuchError):
     """The object has already been destroyed and it's memory freed.