1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00

logging: Don't throw from Activity destructor

Move definition of destructor to logging.cc for
access to util.hh's ignoreException.
This commit is contained in:
Will Dietz 2018-03-03 14:39:04 -06:00
parent 70dbac7491
commit e917c05628
2 changed files with 9 additions and 2 deletions

View file

@ -221,4 +221,12 @@ bool handleJSONLogMessage(const std::string & msg,
return true;
}
Activity::~Activity() {
try {
logger.stopActivity(id);
} catch (...) {
ignoreException();
}
}
}