1 Return-Path: <jani@nikula.org>
\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 A4BCA431FD0
\r
6 for <notmuch@notmuchmail.org>; Fri, 1 Nov 2013 07:27:38 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
13 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id Aw7yuZKubvAJ for <notmuch@notmuchmail.org>;
\r
17 Fri, 1 Nov 2013 07:27:34 -0700 (PDT)
\r
18 Received: from mail-ea0-f173.google.com (mail-ea0-f173.google.com
\r
19 [209.85.215.173]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 40F66431FB6
\r
22 for <notmuch@notmuchmail.org>; Fri, 1 Nov 2013 07:27:34 -0700 (PDT)
\r
23 Received: by mail-ea0-f173.google.com with SMTP id g10so2090283eak.4
\r
24 for <notmuch@notmuchmail.org>; Fri, 01 Nov 2013 07:27:33 -0700 (PDT)
\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
26 d=1e100.net; s=20130820;
\r
27 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
\r
28 :references:in-reply-to:references;
\r
29 bh=emoBs7dLghtavfpAy7YxN20nFqQiC0CKb9juHaSjdOs=;
\r
30 b=QjYtP5PS5lhDgsrZDuS+g+eZh95619OPq6kuZrttazvmrUBF4SKo4eCyrJUYD8kG+R
\r
31 /LZSlJrEBO/iGEnq4tpAvKdEv0cEtSDEX1RgCWLu+vT9l7OfSODDF3VCuwLsdd6oPU5D
\r
32 AaGMBWEAEzBuu35S02Yxq9z5CS20Ciw+sGZORDfQ7lO9etchYjLghCzJs7HYurqABHul
\r
33 VcaE8fJfPpDnJ988+BnmRU2NL4r4BGjkh+OkYvK+JIfpYZ76EM3LuB1bna3HHOQwvhfy
\r
34 xIvls3leu3RBGiE0g+N4ZANyQ1m8/4efMdgJ/3FUB3hq+xdALkDfIyhQ5z3A08hsapQ2
\r
37 ALoCoQmaMA89uu8WeirCdvSdgXJLCddrNAfOoc7Ko9Eym6HX1RPUvMhj42+SwufoqEjN8l6Jvj2/
\r
38 X-Received: by 10.15.33.198 with SMTP id c46mr117965eev.115.1383316053166;
\r
39 Fri, 01 Nov 2013 07:27:33 -0700 (PDT)
\r
40 Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3])
\r
41 by mx.google.com with ESMTPSA id w6sm8341181eeo.12.2013.11.01.07.27.31
\r
42 for <multiple recipients>
\r
43 (version=TLSv1.1 cipher=RC4-SHA bits=128/128);
\r
44 Fri, 01 Nov 2013 07:27:32 -0700 (PDT)
\r
45 From: Jani Nikula <jani@nikula.org>
\r
46 To: notmuch@notmuchmail.org
\r
47 Subject: [PATCH 1/6] lib: construct compactor within try block to catch any
\r
49 Date: Fri, 1 Nov 2013 15:27:10 +0100
\r
51 <3812f697da88a2d4ad90e899484b99723c803ec7.1383315568.git.jani@nikula.org>
\r
52 X-Mailer: git-send-email 1.7.2.5
\r
53 In-Reply-To: <cover.1383315568.git.jani@nikula.org>
\r
54 References: <cover.1383315568.git.jani@nikula.org>
\r
55 In-Reply-To: <cover.1383315568.git.jani@nikula.org>
\r
56 References: <cover.1383315568.git.jani@nikula.org>
\r
57 X-BeenThere: notmuch@notmuchmail.org
\r
58 X-Mailman-Version: 2.1.13
\r
60 List-Id: "Use and development of the notmuch mail system."
\r
61 <notmuch.notmuchmail.org>
\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
65 List-Post: <mailto:notmuch@notmuchmail.org>
\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
68 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
69 X-List-Received-Date: Fri, 01 Nov 2013 14:27:38 -0000
\r
71 Constructors may also throw exceptions. Catch them.
\r
73 lib/database.cc | 3 ++-
\r
74 1 files changed, 2 insertions(+), 1 deletions(-)
\r
76 diff --git a/lib/database.cc b/lib/database.cc
\r
77 index 20e5ec2..3dfea0f 100644
\r
78 --- a/lib/database.cc
\r
79 +++ b/lib/database.cc
\r
80 @@ -864,7 +864,6 @@ notmuch_database_compact (const char* path,
\r
81 notmuch_compact_status_cb_t status_cb)
\r
83 void *local = talloc_new (NULL);
\r
84 - NotmuchCompactor compactor(status_cb);
\r
85 char *notmuch_path, *xapian_path, *compact_xapian_path;
\r
86 char *old_xapian_path = NULL;
\r
87 notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;
\r
88 @@ -910,6 +909,8 @@ notmuch_database_compact (const char* path,
\r
92 + NotmuchCompactor compactor(status_cb);
\r
94 compactor.set_renumber(false);
\r
95 compactor.add_source(xapian_path);
\r
96 compactor.set_destdir(compact_xapian_path);
\r