aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/blockstore.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-04-04 14:32:40 +0200
committerGitHub Enterprise <[email protected]>2024-04-04 14:32:40 +0200
commit12b7bf1c16f671c83840961c37a339141a7ffbb3 (patch)
tree3c503e6e1cd4d53b87c1baebcf9286ca8b72db06 /src/zenstore/blockstore.cpp
parenthardening parsepackagemessage (#38) (diff)
downloadzen-12b7bf1c16f671c83840961c37a339141a7ffbb3.tar.xz
zen-12b7bf1c16f671c83840961c37a339141a7ffbb3.zip
improved assert (#37)
- Improvement: Add file and line to ASSERT exceptions - Improvement: Catch call stack when throwing assert exceptions and log/output call stack at important places to provide more context to caller
Diffstat (limited to 'src/zenstore/blockstore.cpp')
-rw-r--r--src/zenstore/blockstore.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/zenstore/blockstore.cpp b/src/zenstore/blockstore.cpp
index dfa852434..a576ff022 100644
--- a/src/zenstore/blockstore.cpp
+++ b/src/zenstore/blockstore.cpp
@@ -915,7 +915,7 @@ BlockStore::ReclaimSpace(const ReclaimSnapshotState& Snapshot,
NewBlockFile = nullptr;
}
}
- catch (std::system_error& SystemError)
+ catch (const std::system_error& SystemError)
{
if (IsOOM(SystemError.code()))
{
@@ -930,11 +930,11 @@ BlockStore::ReclaimSpace(const ReclaimSnapshotState& Snapshot,
ZEN_ERROR("reclaiming space for '{}' failed with system error exception: '{}'", m_BlocksBasePath, SystemError.what());
}
}
- catch (std::bad_alloc& BadAlloc)
+ catch (const std::bad_alloc& BadAlloc)
{
ZEN_WARN("reclaiming space for '{}' ran out of memory: '{}'", m_BlocksBasePath, BadAlloc.what());
}
- catch (std::exception& ex)
+ catch (const std::exception& ex)
{
ZEN_ERROR("reclaiming space for '{}' failed with: '{}'", m_BlocksBasePath, ex.what());
}