From bab8d9b52a75276980fed9288573abf4eb7308f8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 12 Nov 2014 11:35:53 +0100 Subject: [PATCH] Make ~DerivationGoal more reliable --- src/libstore/build.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index e8067acbd..5aea4742a 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -851,13 +851,9 @@ DerivationGoal::~DerivationGoal() { /* Careful: we should never ever throw an exception from a destructor. */ - try { - killChild(); - deleteTmpDir(false); - closeLogFile(); - } catch (...) { - ignoreException(); - } + try { killChild(); } catch (...) { ignoreException(); } + try { deleteTmpDir(false); } catch (...) { ignoreException(); } + try { closeLogFile(); } catch (...) { ignoreException(); } }