aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-08-20 22:53:10 +0200
committerStefan Boberg <[email protected]>2021-08-20 22:53:10 +0200
commitc74b987afbb2516c9c190629f46619d67344db21 (patch)
tree9d5b210330e5d4f92e93eb6094a7d700a75481bd
parentWIP services (diff)
downloadzen-c74b987afbb2516c9c190629f46619d67344db21.tar.xz
zen-c74b987afbb2516c9c190629f46619d67344db21.zip
Changed file CAS implementation to use ThrowSystemException instead of WindowsException to get more detail on failures
-rw-r--r--zenstore/filecas.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/zenstore/filecas.cpp b/zenstore/filecas.cpp
index 3a31cfd00..80943a6c1 100644
--- a/zenstore/filecas.cpp
+++ b/zenstore/filecas.cpp
@@ -149,7 +149,7 @@ FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash)
if (FAILED(hRes))
{
- throw WindowsException(hRes, "Failed to open shard directory '{}'"_format(FilePath));
+ ThrowSystemException(hRes, "Failed to open shard directory '{}'"_format(FilePath));
}
// Retry
@@ -231,7 +231,7 @@ FileCasStrategy::InsertChunk(const void* const ChunkData, const size_t ChunkSize
if (FAILED(hRes))
{
- throw WindowsException(hRes, "Failed to open shard file '{}'"_format(WideToUtf8(ShardedPath)));
+ ThrowSystemException(hRes, "Failed to open shard file '{}'"_format(WideToUtf8(ShardedPath)));
}
size_t ChunkRemain = ChunkSize;