X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=bindings%2Fpython-cffi%2Fnotmuch2%2F_errors.py;h=f55cc96b53bf44ba69cbbd0b5774626fc8006632;hb=9ae4188610dc21101fe9bdeb158854fc7c63463e;hp=c97d99cbde5fa9fac4e9c159b5c51dd3702ff6c8;hpb=eea258c0c9386a5eecae48a98b552113a3584a7d;p=notmuch diff --git a/bindings/python-cffi/notmuch2/_errors.py b/bindings/python-cffi/notmuch2/_errors.py index c97d99cb..f55cc96b 100644 --- a/bindings/python-cffi/notmuch2/_errors.py +++ b/bindings/python-cffi/notmuch2/_errors.py @@ -52,6 +52,12 @@ class NotmuchError(Exception): IllegalArgumentError, capi.lib.NOTMUCH_STATUS_NO_CONFIG: NoConfigError, + capi.lib.NOTMUCH_STATUS_NO_DATABASE: + NoDatabaseError, + capi.lib.NOTMUCH_STATUS_DATABASE_EXISTS: + DatabaseExistsError, + capi.lib.NOTMUCH_STATUS_BAD_QUERY_SYNTAX: + QuerySyntaxError, } return types[status] @@ -97,6 +103,9 @@ class UpgradeRequiredError(NotmuchError): pass class PathError(NotmuchError): pass 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.