Re: [PATCH v2 5/7] lib: return NOTMUCH_STATUS_OPERATION_INVALIDATED where appropriate

Subject: Re: [PATCH v2 5/7] lib: return NOTMUCH_STATUS_OPERATION_INVALIDATED where appropriate

Date: Tue, 05 Aug 2025 11:46:09 -0300

To: Olly Betts

Cc: notmuch@notmuchmail.org, xapian-discuss@lists.xapian.org

From: David Bremner


Olly Betts <olly@survex.com> writes:

>
> Presumably this gets called from a catch block on the exception just
> caught in which case you can rethrow the current exception with just
> `throw;` (we do this in xapian-bindings to avoid a lot of duplicate
> code to translate a C++ exception to something suitable in the target
> language).  I don't know if that's actually better than explicitly
> throwing the exception object again like you showed.

Ah right, thanks for the pointer. I see XapianExceptionHandler in
xapian-bindings/generate-generic-exceptions does essentially what I
proposed, except with the expression-less throw you mention. I guess
that makes me lean towards this solution unless convinced otherwise.

d
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: