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 2OhiBP0jBl+RXwAA0tVLHw (envelope-from ) for ; Wed, 08 Jul 2020 19:52:29 +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 MBokAP0jBl92NQAAbx9fmQ (envelope-from ) for ; Wed, 08 Jul 2020 19:52:29 +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 9923E940308 for ; Wed, 8 Jul 2020 19:52:26 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id A3BF11FC1C; Wed, 8 Jul 2020 15:52:13 -0400 (EDT) Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by mail.notmuchmail.org (Postfix) with ESMTPS id 8C0BC1F70F for ; Wed, 8 Jul 2020 15:52:10 -0400 (EDT) Received: by mail-ej1-x644.google.com with SMTP id dp18so51769027ejc.8 for ; Wed, 08 Jul 2020 12:52:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version; bh=OBKiuhwsTbGKllPXT8FSa09uvV0BBCwKYjPQFMb+kto=; b=mLxtt+JjploVys9p4UA7nGOl5koY/fFQbhvPTwYCiTTpAHMgV+Fqy9DNiYVcf/JebG 6O4Q+BX6n0r+K5VuusV77ec84gINBCnoiVXR96UzsreyX9Ly12XCyA6n7eAx/9MkCk9+ qy1Df25iVNA/JUmWOkyUPd73UFndUfEm+BEYWAvFqjrdhVFUQXrrhCHj4zv+NtTZZbnq GaMWvMD2ERT+sA/FAQdLHyjRjkP6CHuTy+h1crQI2J6irogQLHwe+OSYbUqq8ufX7qAB xZQGsgND/n6zizC+uw7pFUe4JnkvcjF8mgCUb340Mk/+xmomvzCyJqrO5gEz8oJ1Bk7u xY9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:in-reply-to:references :date:message-id:mime-version; bh=OBKiuhwsTbGKllPXT8FSa09uvV0BBCwKYjPQFMb+kto=; b=MccL+5WmLQT9bxP8vSZcX5TeNGU2VEoKBK4hJ6T0wDiGR7tJagAizjlgNbn8HpYipB zqS4NyGGfKyh6wsUQCMgDMri7sB8RHtRcDarsaNXtJGSkbizx8tiIiCidJ6Y/w0scJj7 h5dViLxHKCXt9eVkHd8jIjOZNh/+1ruUGZPqvcBX227oer5yV+MM5GVTOgu8zcAjDEK4 6deCsLDsQkWoboN1I9rauzObXXhCnrLZTUE8tPZiiW0wFrrX9USEs1Db0B+c7Bzwnwg0 PLlhOw7Krj4C6bP8aLyDZPCudWrcaXvShCGu+JsKGwWXo4BriZDtL+7ZckcGXCHL48cI i9jQ== X-Gm-Message-State: AOAM5301+2JOAQvhjN2bdPoZYFxm/9MOdixr6s4VBQOJda3rI3wt3DZ9 Tl8jS+Kf2lcMt0+MQyFrDGk= X-Google-Smtp-Source: ABdhPJy+NRKvbqylg3ja2Lq36ixsiHXw+ddth/iW30H1PE+P5DonfWA2K5hP9TRz8NWagsmtI9+dVQ== X-Received: by 2002:a17:906:60c6:: with SMTP id f6mr39186486ejk.265.1594237924630; Wed, 08 Jul 2020 12:52:04 -0700 (PDT) Received: from powell.devork.be (2a02-8388-8480-1180-4c18-fc69-8d8c-22b5.cable.dynamic.v6.surfer.at. [2a02:8388:8480:1180:4c18:fc69:8d8c:22b5]) by smtp.gmail.com with ESMTPSA id be2sm347828edb.92.2020.07.08.12.52.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2020 12:52:03 -0700 (PDT) Sender: Floris Bruynooghe Received: (nullmailer pid 114799 invoked by uid 1000); Wed, 08 Jul 2020 19:52:02 -0000 From: Floris Bruynooghe To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH 2/4] lib: catch error from closed db in n_m_get_message_id In-Reply-To: <87eeprkxnu.fsf@tethera.net> References: <20200630011411.612552-1-david@tethera.net> <20200630011411.612552-3-david@tethera.net> <87h7unxp1j.fsf@powell.devork.be> <87eeprkxnu.fsf@tethera.net> Date: Wed, 08 Jul 2020 21:52:02 +0200 Message-ID: <873661dbtp.fsf@powell.devork.be> MIME-Version: 1.0 Message-ID-Hash: TJ75MKI73KX347HTYD6M33BZOPYHECG3 X-Message-ID-Hash: TJ75MKI73KX347HTYD6M33BZOPYHECG3 X-MailFrom: floris.bruynooghe@gmail.com 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=fail (body hash did not verify) header.d=gmail.com header.s=20161025 header.b=mLxtt+Jj; 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: L0eQuxCe7XF7 On Sat 04 Jul 2020 at 14:17 -0300, David Bremner wrote: > Floris Bruynooghe writes: > > >>> - * This function will not return NULL since Notmuch ensures that every >>> - * message has a unique message ID, (Notmuch will generate an ID for a >>> - * message if the original file does not contain one). >>> + * This function will return NULL if triggers an unhandled Xapian >>> + * exception. > >> How much of a departure from the existing API is this? Will this be >> possible with all functions? I had a quick look and tried some other >> functions that don't return notmuch_status_t: > > It's upward compatible in that any code which crashes because it was not > expecting a NULL pointer, will already be crashing in the same > circumstances because of an uncaught exception / call to abort. Oh yes, that is a very good point. This choice seems very reason then. Cheers, Floris