diff options
-rw-r--r-- | lib/backupstore/HousekeepStoreAccount.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/backupstore/HousekeepStoreAccount.cpp b/lib/backupstore/HousekeepStoreAccount.cpp index e5bd3cbb..c965dd17 100644 --- a/lib/backupstore/HousekeepStoreAccount.cpp +++ b/lib/backupstore/HousekeepStoreAccount.cpp @@ -81,7 +81,17 @@ HousekeepStoreAccount::~HousekeepStoreAccount() { if(mapNewRefs.get()) { - mapNewRefs->Discard(); + // Discard() can throw exception, but destructors aren't supposed to do that, so + // just catch and log them. + try + { + mapNewRefs->Discard(); + } + catch(BoxException &e) + { + BOX_ERROR("Failed to destroy housekeeper: discarding the refcount " + "database threw an exception: " << e.what()); + } } } |