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 firstname.lastname@example.org https://notmuchmail.org/mailman/listinfo/notmuch