[PATCH v2 5/7] lib: return NOTMUCH_STATUS_OPERATION_INVALIDATED where appropriate
David Bremner
david at tethera.net
Tue Aug 5 15:46:09 BST 2025
Olly Betts <olly at 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
More information about the Xapian-discuss
mailing list