introduce exception handling at top level of libnotmuch

Subject: introduce exception handling at top level of libnotmuch

Date: Mon, 29 Jun 2020 22:14:07 -0300

To: notmuch@notmuchmail.org

Cc:

From: David Bremner


I know that some of you are not C++ fans, but at the moment this is
the cleanest fix I can think of to uncaught xapian exceptions causing
calls to the library to die. Floris reminded me of this recently with
the discussion about operations on closed databases, but cleaning up
the handling of exceptions in libnotmuch has been on my mind for a
while. It will be bit laborious so I did a few functions for
discussion purposes before getting too carried away.

There is still a certain amount of boilerplate with more or less
identical try/catch blocks (yes, I really miss scheme macros here). I
could mostly eliminate that with C++11 lambdas, but I wasn't sure the
result was more maintainable or nicer.

This is definitely targeted for post 0.30.


_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: