From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: introduce exception handling at top level of libnotmuch
Date: Thu, 02 Jul 2020 15:16:51 -0400 [thread overview]
Message-ID: <87tuypu3q4.fsf@fifthhorseman.net> (raw)
In-Reply-To: <20200630011411.612552-1-david@tethera.net>
[-- Attachment #1.1: Type: text/plain, Size: 1179 bytes --]
Hi Bremner, all--
On Mon 2020-06-29 22:14:07 -0300, David Bremner wrote:
> 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.
I've read through the series and it looks reasonable to me.
I've also tested them, and they behave as expected.
If someone has a more nuanced approach to dealing with some of the
subtle exceptions that might be raised, i'd be happy to see those
approaches laid on top of this series.
> 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.
I think this looks fine, and it isn't a huge amount of boilerplate.
Please merge.
--dkg
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
[-- Attachment #2: Type: text/plain, Size: 158 bytes --]
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org
next prev parent reply other threads:[~2020-07-02 19:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-30 1:14 introduce exception handling at top level of libnotmuch David Bremner
2020-06-30 1:14 ` [PATCH 1/4] test: add known broken test for error handling on closed database David Bremner
2020-06-30 1:14 ` [PATCH 2/4] lib: catch error from closed db in n_m_get_message_id David Bremner
2020-07-04 15:44 ` Floris Bruynooghe
2020-07-04 17:17 ` David Bremner
2020-07-05 11:17 ` David Bremner
2020-07-08 19:55 ` Floris Bruynooghe
2020-07-08 19:52 ` Floris Bruynooghe
2020-06-30 1:14 ` [PATCH 3/4] test: add known broken test for n_m_get_thread_id on closed db David Bremner
2020-06-30 1:14 ` [PATCH 4/4] lib/message: catch exception in n_m_get_thread_id David Bremner
2020-07-02 19:16 ` Daniel Kahn Gillmor [this message]
2020-07-04 0:15 ` introduce exception handling at top level of libnotmuch David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tuypu3q4.fsf@fifthhorseman.net \
--to=dkg@fifthhorseman.net \
--cc=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).