From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OBwNDR5kBl8/QQAA0tVLHw (envelope-from ) for ; Thu, 09 Jul 2020 00:26:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id ONfxCB5kBl+dawAA1q6Kng (envelope-from ) for ; Thu, 09 Jul 2020 00:26:06 +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 (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AA8229400D3 for ; Thu, 9 Jul 2020 00:26:05 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 7B7FB20051; Wed, 8 Jul 2020 20:25:40 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 4F59C1FC9C for ; Wed, 8 Jul 2020 20:25:14 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id C6EB5613B0; Wed, 8 Jul 2020 20:17:16 -0400 (EDT) Received: (nullmailer pid 449317 invoked by uid 1000); Thu, 09 Jul 2020 00:17:14 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: fourth batch of API cleanup for exception handling Date: Wed, 8 Jul 2020 21:16:59 -0300 Message-Id: <20200709001709.449217-1-david@tethera.net> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Message-ID-Hash: GM7WB6ABLDYXG3HYQODNDJ3R75TRPENJ X-Message-ID-Hash: GM7WB6ABLDYXG3HYQODNDJ3R75TRPENJ X-MailFrom: bremner@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: 1.53 X-TUID: 4fwpuaf/zBeC This continues id:20200705130025.4057292-1-david@tethera.net and probably needs to be applied on top of it. There are a couple cases here where we use the NULL returns from previous API changes and convert it back into NOTMUCH_STATUS_XAPIAN_EXCEPTION. It isn't the most lovely error path, but it works. I guess an enhancement would be to have some kind of errno set as Floris mentioned. We'd still want the NULL returns to signal an error however, so I think that could be done incrementally. This completes (I think) the changes needed for message.cc d