unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Gaute Hope <eg@gaute.vetsj.com>, notmuch <notmuch@notmuchmail.org>
Subject: Re: DatabaseModifiedErrors causing troubles
Date: Wed, 31 Dec 2014 09:28:04 +0100	[thread overview]
Message-ID: <87bnmkgr57.fsf@maritornes.cs.unb.ca> (raw)
In-Reply-To: <CABKe4MvEdcsq8BZ-vq6R0Vnw87zEgBvqW_2F-Wysf5GNchqweg@mail.gmail.com>

Gaute Hope <eg@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@tethera.net

In particular id:1419788030-10567-6-git-send-email-david@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@tethera.net

Let me know what you think,

David

  parent reply	other threads:[~2014-12-31  8:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-11 12:17 DatabaseModifiedErrors causing troubles Gaute Hope
2014-08-21  8:59 ` Gaute Hope
2014-08-21  9:01   ` Gaute Hope
2014-12-31  8:28 ` David Bremner [this message]
2015-01-17 11:18   ` Gaute Hope
2015-01-17 12:29     ` David Bremner
2015-01-17 15:12       ` Gaute Hope

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=87bnmkgr57.fsf@maritornes.cs.unb.ca \
    --to=david@tethera.net \
    --cc=eg@gaute.vetsj.com \
    --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).