mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-13 20:18:50 +03:00
fix unchecked optionals
also discard exceptions in file cache futures
This commit is contained in:
@@ -17,8 +17,13 @@ Cache::Cache() {
|
||||
Cache::~Cache() {
|
||||
m_worker.stop();
|
||||
|
||||
for (auto &future : m_futures)
|
||||
if (future.valid()) future.get();
|
||||
for (auto &future : m_futures) {
|
||||
if (future.valid()) {
|
||||
try { // dont care about stored exceptions
|
||||
future.get();
|
||||
} catch (...) {}
|
||||
}
|
||||
}
|
||||
|
||||
std::error_code err;
|
||||
if (!std::filesystem::remove_all(m_tmp_path, err))
|
||||
|
||||
Reference in New Issue
Block a user