aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/projectstore/remoteprojectstore.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/zenserver/projectstore/remoteprojectstore.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/zenserver/projectstore/remoteprojectstore.cpp')
-rw-r--r--src/zenserver/projectstore/remoteprojectstore.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/zenserver/projectstore/remoteprojectstore.cpp b/src/zenserver/projectstore/remoteprojectstore.cpp
index e11541534..8efb92e6b 100644
--- a/src/zenserver/projectstore/remoteprojectstore.cpp
+++ b/src/zenserver/projectstore/remoteprojectstore.cpp
@@ -835,7 +835,7 @@ BuildContainer(CidStore& ChunkStore,
}
}
}
- catch (std::exception& Ex)
+ catch (const std::exception& Ex)
{
RemoteResult.SetError(gsl::narrow<int>(HttpResponseCode::NotFound),
fmt::format("Failed to resolve attachment {}", RawHash),
@@ -1216,7 +1216,7 @@ BuildContainer(CidStore& ChunkStore,
return {};
}
}
- catch (std::exception& Ex)
+ catch (const std::exception& Ex)
{
BlockCreateLatch.CountDown();
while (!BlockCreateLatch.Wait(1000))
@@ -1740,7 +1740,7 @@ SaveOplog(CidStore& ChunkStore,
CreatedBlocks.insert({BlockHash, std::move(BlockBuffer)});
ZEN_DEBUG("Saved temp block to '{}', {}", AttachmentTempPath, NiceBytes(BlockBuffer.GetSize()));
}
- catch (std::exception& Ex)
+ catch (const std::exception& Ex)
{
RemoteResult.SetError(gsl::narrow<int32_t>(HttpResponseCode::InternalServerError),
Ex.what(),