Make ~DerivationGoal more reliable

This commit is contained in:
Eelco Dolstra 2014-11-12 11:35:53 +01:00 committed by Ludovic Courtès
parent 86b9e6d457
commit e0825bd36b
1 changed files with 3 additions and 7 deletions

View File

@ -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(); }
}