DatabaseModifiedErrors causing troubles

David Bremner david at tethera.net
Wed Dec 31 00:28:04 PST 2014


Gaute Hope <eg at gaute.vetsj.com> writes:

> I can work around this by checking for a NULL pointer returned from
> notmuch_query_search_threads () and re-open the database
> (notmuch_database_close () -> notmuch_database_open ()). But I have no
> way of knowing programatically if this really is the error that has
> happened. There should be some way of propagating the error
> information or (even better for my case; for notmuch to reopen the
> database), one option is the Gmime way of passing an pointer to an
> error structure that is filled up by the notmuch interface function.

Hi Gaute;

Sorry this sequence of postings of yours kindof fell down a well. In
general there seems to be not very much enthusiasm for the GError
solution.  We can do something less fancy with the series at

           id:1419788030-10567-2-git-send-email-david at tethera.net

In particular id:1419788030-10567-6-git-send-email-david at tethera.net
replaces the printfs with saving to a status string accessible from
notmuch_database_t.

I _think_ this could solve your problem, although doing strcmp on error
message might not be ideal. Overall this is much less api breakage
(only open and create need to be wrapped).

We could also consider really updating the api for those NULL returning
functions, but it seems less bad to me than the count functions updated
in this series

   id:1419971380-10307-2-git-send-email-david at tethera.net

Let me know what you think,

David


More information about the notmuch mailing list