From 78cd3a0cd10c822f7ab0838929daf731ff35b7d4 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Wed, 31 Dec 2014 21:11:06 +0100 Subject: [PATCH] Re: [PATCH] ruby: add bindings for `notmuch_database_get_all_tags` --- 0d/081975d063e49980a65b890fa030b5bad36dd6 | 75 +++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 0d/081975d063e49980a65b890fa030b5bad36dd6 diff --git a/0d/081975d063e49980a65b890fa030b5bad36dd6 b/0d/081975d063e49980a65b890fa030b5bad36dd6 new file mode 100644 index 000000000..c10765026 --- /dev/null +++ b/0d/081975d063e49980a65b890fa030b5bad36dd6 @@ -0,0 +1,75 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id E374B431FC0 + for ; Wed, 31 Dec 2014 12:11:23 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id QxYOlkT92BJ0 for ; + Wed, 31 Dec 2014 12:11:20 -0800 (PST) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id A92F1431FCB + for ; Wed, 31 Dec 2014 12:11:20 -0800 (PST) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1Y6Pbs-0000FH-Ci; Wed, 31 Dec 2014 16:11:12 -0400 +Received: (nullmailer pid 2455 invoked by uid 1000); Wed, 31 Dec 2014 + 20:11:06 -0000 +From: David Bremner +To: Ludovic LANGE , notmuch@notmuchmail.org +Subject: Re: [PATCH] ruby: add bindings for `notmuch_database_get_all_tags` +In-Reply-To: <1416167892-15686-1-git-send-email-ll-notmuchmail@lange.nom.fr> +References: <1416167892-15686-1-git-send-email-ll-notmuchmail@lange.nom.fr> +User-Agent: Notmuch/0.19+7~g5d7f7a6 (http://notmuchmail.org) Emacs/24.4.1 + (x86_64-pc-linux-gnu) +Date: Wed, 31 Dec 2014 21:11:06 +0100 +Message-ID: <874msbh95x.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 31 Dec 2014 20:11:24 -0000 + +Ludovic LANGE 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 -- 2.26.2