From e0825bd36b43f3c1d408745a9c61f92fdaf7dace 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 --- nix/libstore/build.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc index 19d22ac374..49a6ac9704 100644 --- a/nix/libstore/build.cc +++ b/nix/libstore/build.cc @@ -863,13 +863,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(); } }