1 Return-Path: <too@guru-group.fi>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 840AE431FD0
\r
6 for <notmuch@notmuchmail.org>; Wed, 13 Nov 2013 09:03:03 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id FzooEcyCI5sV for <notmuch@notmuchmail.org>;
\r
16 Wed, 13 Nov 2013 09:02:56 -0800 (PST)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 035B1431FC7
\r
19 for <notmuch@notmuchmail.org>; Wed, 13 Nov 2013 09:02:55 -0800 (PST)
\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)
\r
21 id 6AE6A1000F2; Wed, 13 Nov 2013 19:02:51 +0200 (EET)
\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
23 To: notmuch@notmuchmail.org
\r
24 Subject: [PATCH v2 2/5] compact: catch Xapian::Error consistently
\r
25 Date: Wed, 13 Nov 2013 19:02:44 +0200
\r
26 Message-Id: <1384362167-12740-3-git-send-email-tomi.ollila@iki.fi>
\r
27 X-Mailer: git-send-email 1.8.0
\r
28 In-Reply-To: <1384362167-12740-1-git-send-email-tomi.ollila@iki.fi>
\r
29 References: <1384362167-12740-1-git-send-email-tomi.ollila@iki.fi>
\r
30 Cc: tomi.ollila@iki.fi
\r
31 X-BeenThere: notmuch@notmuchmail.org
\r
32 X-Mailman-Version: 2.1.13
\r
34 List-Id: "Use and development of the notmuch mail system."
\r
35 <notmuch.notmuchmail.org>
\r
36 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
37 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
38 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
39 List-Post: <mailto:notmuch@notmuchmail.org>
\r
40 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
41 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
42 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
43 X-List-Received-Date: Wed, 13 Nov 2013 17:03:03 -0000
\r
45 catch Xapian::Error in compact code in lib/database.cc to be consistent
\r
46 with other code in addition to not making software crash on uncaught
\r
49 lib/database.cc | 4 ++--
\r
50 1 file changed, 2 insertions(+), 2 deletions(-)
\r
52 diff --git a/lib/database.cc b/lib/database.cc
\r
53 index 3c008d6..3530cb6 100644
\r
54 --- a/lib/database.cc
\r
55 +++ b/lib/database.cc
\r
56 @@ -918,8 +918,8 @@ notmuch_database_compact (const char *path,
\r
57 compactor.add_source (xapian_path);
\r
58 compactor.set_destdir (compact_xapian_path);
\r
59 compactor.compact ();
\r
60 - } catch (Xapian::InvalidArgumentError e) {
\r
61 - fprintf (stderr, "Error while compacting: %s\n", e.get_msg().c_str());
\r
62 + } catch (const Xapian::Error &error) {
\r
63 + fprintf (stderr, "Error while compacting: %s\n", error.get_msg().c_str());
\r
64 ret = NOTMUCH_STATUS_XAPIAN_EXCEPTION;
\r