From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id z54XJapiGV+UTgAA0tVLHw (envelope-from ) for ; Thu, 23 Jul 2020 10:12:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id QExxIKpiGV9VQgAAbx9fmQ (envelope-from ) for ; Thu, 23 Jul 2020 10:12:58 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E14F19401CF for ; Thu, 23 Jul 2020 10:12:57 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id A169520058; Thu, 23 Jul 2020 06:12:54 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id F3B5D1FA22 for ; Thu, 23 Jul 2020 06:12:52 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id E221F60AB7; Thu, 23 Jul 2020 06:12:52 -0400 (EDT) Received: (nullmailer pid 807799 invoked by uid 1000); Thu, 23 Jul 2020 10:12:51 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: Re: [PATCH 4/4] lib/n_d_get_version: catch exceptions and clarify the API In-Reply-To: <87pn8noidf.fsf@tethera.net> References: <20200714224119.717845-1-david@tethera.net> <20200714224119.717845-5-david@tethera.net> <87pn8noidf.fsf@tethera.net> Date: Thu, 23 Jul 2020 07:12:51 -0300 Message-ID: <878sfao7z0.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 6EXIFZUP5AIQAF54ALMBWOG4MN6VFIZ2 X-Message-ID-Hash: 6EXIFZUP5AIQAF54ALMBWOG4MN6VFIZ2 X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: -0.97 X-TUID: E0NjBapwIgXq David Bremner writes: > David Bremner writes: > >> notmuch_database_get_version previously returned 0 on some errors, but >> did not document this. Luckily 0 is not a valid database version. >> +static void >> +_log_xapian_exception (const char *where, notmuch_database_t *notmuch, const Xapian::Error error) { >> + _notmuch_database_log (notmuch, >> + "A Xapian exception occurred %s accessing %s : %s\n", >> + where, >> + error.get_msg ().c_str ()); >> + notmuch->exception_reported = true; >> +} >> + > > I realized this has the same extra '%s' as fixed in > > id:20200722120905.472562-2-david@tethera.net > > for message.cc. So this patch will need to be updated, and possibly some > of the tests as well. updated version applied to master. d