Re: [PATCH v2 5/7] lib: return NOTMUCH_STATUS_OPERATION_INVALIDATED where appropriate
David Bremner <[email protected]> Tue, 05 Aug 2025 11:46:09 -0300
| Newsgroups | gmane.comp.search.xapian.general,gmane.mail.notmuch.general |
|---|---|
| Message-ID | <[email protected]> |
Olly Betts <[email protected]> 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