From 64f07faa75811ef21d18f78db75242f00499c808 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Fri, 23 Aug 2024 14:20:10 +0200 Subject: Make sure `noexcept` functions does not leak exceptions (#136) --- src/zenstore/cache/structuredcachestore.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/zenstore/cache/structuredcachestore.cpp') diff --git a/src/zenstore/cache/structuredcachestore.cpp b/src/zenstore/cache/structuredcachestore.cpp index d7d594af7..9981aa1eb 100644 --- a/src/zenstore/cache/structuredcachestore.cpp +++ b/src/zenstore/cache/structuredcachestore.cpp @@ -159,9 +159,9 @@ ZenCacheNamespace::EndPutBatch(PutBatchHandle* Batch) noexcept m_DiskLayer.EndPutBatch(Batch->DiskLayerHandle); delete Batch; } - catch (std::exception& Ex) + catch (const std::exception& Ex) { - ZEN_ERROR("Exception in cache namespace layer when ending batch put operation: '{}'", Ex.what()); + ZEN_ERROR("Exception in ZenCacheNamespace::EndPutBatch: '{}'", Ex.what()); } } @@ -203,9 +203,9 @@ ZenCacheNamespace::EndGetBatch(GetBatchHandle* Batch) noexcept } delete Batch; } - catch (std::exception& Ex) + catch (const std::exception& Ex) { - ZEN_ERROR("Exception in cache namespace layer when ending batch put operation: '{}'", Ex.what()); + ZEN_ERROR("Exception in ZenCacheNamespace::EndGetBatch: '{}'", Ex.what()); } } @@ -570,7 +570,7 @@ ZenCacheStore::PutBatch::~PutBatch() m_Store->EndPutBatch(m_NamespaceBatchHandle); } } - catch (std::exception& Ex) + catch (const std::exception& Ex) { ZEN_ERROR("Exception in cache store when ending batch put operation: '{}'", Ex.what()); } @@ -607,7 +607,7 @@ ZenCacheStore::GetBatch::~GetBatch() } } } - catch (std::exception& Ex) + catch (const std::exception& Ex) { ZEN_ERROR("Exception in cache store when ending batch get operation: '{}'", Ex.what()); } -- cgit v1.2.3