Re: [PATCH] ruby: add bindings for `notmuch_database_get_all_tags`

Subject: Re: [PATCH] ruby: add bindings for `notmuch_database_get_all_tags`

Date: Wed, 31 Dec 2014 21:11:06 +0100

To: Ludovic LANGE, notmuch@notmuchmail.org

Cc:

From: David Bremner


Ludovic LANGE <ll-notmuchmail@lange.nom.fr> writes:

> +    tags = notmuch_database_get_all_tags (db);
> +    if (!tags)
> +    	rb_raise (notmuch_rb_eMemoryError, "Out of memory");

Hi Ludovic;

Sorry about the slow response.  It's not really your fault, but this
exception is is not really correct, since there are at least two
possible error conditions which get squashed into a NULL.  I have
proposed a series [1] which should make it possible to tell the
difference, but in the mean time I wonder if it would be better to
to do 

rb_raise (notmuch_rb_eBaseError, "unknown notmuch error")

with a comment "XXX: figure out actual error".

Cheers,

d

[1]: id:1419788030-10567-2-git-send-email-david@tethera.net

Thread: