Re: DatabaseModifiedErrors causing troubles

Subject: Re: DatabaseModifiedErrors causing troubles

Date: Thu, 21 Aug 2014 11:01:09 +0200

To: notmuch

Cc:

From: Gaute Hope


On Thu, Aug 21, 2014 at 10:59 AM, Gaute Hope <eg@gaute.vetsj.com> wrote:
> For portability I would suggest starting to move towards the GError
> scheme provided by glib (also used by gmime). This is a somewhat major
> effort though since ensuring that error propagation is done right [0] is
> somewhat tricky. It provides more or less the same functionality as
> exceptions do in C++.
>
> There is also the problem of having to change the API - one way to avoid
> that is to create wrappers that behave like the old API, but don't
> handle errors that good. This requires the addition of addiontal _error
> variations of the current set of functions. It will be a mess.
>
> [0] https://developer.gnome.org/glib/stable/glib-Error-Reporting.html

Here's a quick mockup of how that could look.

Cheers, Gaute

Thread: