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 3C950431FC0 for ; Sat, 18 Jan 2014 16:09:28 -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 kOnO6aC-iHqd for ; Sat, 18 Jan 2014 16:09:26 -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 BFCD4431FBC for ; Sat, 18 Jan 2014 16:09:26 -0800 (PST) Received: from remotemail by yantan.tethera.net with local (Exim 4.80) (envelope-from ) id 1W4fx7-0003ls-2j; Sat, 18 Jan 2014 20:09:25 -0400 Received: (nullmailer pid 32014 invoked by uid 1000); Sun, 19 Jan 2014 00:09:21 -0000 From: David Bremner To: Tomi Valkeinen , notmuch@notmuchmail.org Subject: Re: [PATCH 2/2] lib: fix error handling In-Reply-To: <1384837831-9206-2-git-send-email-tomi.valkeinen@iki.fi> References: <1384837831-9206-1-git-send-email-tomi.valkeinen@iki.fi> <1384837831-9206-2-git-send-email-tomi.valkeinen@iki.fi> User-Agent: Notmuch/0.17+30~g50677dd (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Sat, 18 Jan 2014 20:09:21 -0400 Message-ID: <87vbxgg7da.fsf@zancas.localnet> 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: Sun, 19 Jan 2014 00:09:28 -0000 Tomi Valkeinen writes: > Currently if a Xapian exception happens in notmuch_message_get_header, > the exception is not caught leading to crash. In > notmuch_message_get_date the exception is caught, but an internal error > is raised, again leading to crash. > > This patch fixes the error handling by making both functions catch the > Xapian exceptions, print an error and return NULL or 0. pushed, thanks d