Skip to content

Commit

Permalink
Catch exceptions from load().
Browse files Browse the repository at this point in the history
  • Loading branch information
josephbirkner committed Jul 17, 2024
1 parent f3edafc commit b9cea63
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libs/httpcl/src/http-settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,13 @@ Config Settings::operator[] (const std::string &url) const
std::shared_lock lock(mutex);
if (lastRead < lastUpdated.load(std::memory_order_relaxed)) {
lock.unlock();
const_cast<Settings*>(this)->load();
try {
const_cast<Settings*>(this)->load();
}
catch (...) {
// If an exception occurred during load(), it was already
// logged in all likelihood.
}
lock.lock();
}

Expand Down

0 comments on commit b9cea63

Please sign in to comment.