aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/cachestore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zenserver/cache/cachestore.cpp')
-rw-r--r--zenserver/cache/cachestore.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/zenserver/cache/cachestore.cpp b/zenserver/cache/cachestore.cpp
index fc218de6b..5b0358994 100644
--- a/zenserver/cache/cachestore.cpp
+++ b/zenserver/cache/cachestore.cpp
@@ -7,6 +7,7 @@
#include <fmt/core.h>
#include <spdlog/spdlog.h>
#include <zencore/filesystem.h>
+#include <zencore/fmtutils.h>
#include <zencore/iobuffer.h>
#include <zencore/string.h>
#include <zencore/thread.h>
@@ -18,6 +19,7 @@
#include <atlfile.h>
using namespace zen;
+using namespace fmt::literals;
namespace UE {
@@ -720,7 +722,9 @@ ZenFile::Read(void* Data, uint64_t Size, uint64_t Offset)
if (FAILED(hRes))
{
- throw std::system_error(GetLastError(), std::system_category(), "Failed to read from file" /* TODO: add context */);
+ throw std::system_error(GetLastError(),
+ std::system_category(),
+ "Failed to read from file '{}'"_format(zen::PathFromHandle(m_File)));
}
}
@@ -736,7 +740,7 @@ ZenFile::Write(const void* Data, uint64_t Size, uint64_t Offset)
if (FAILED(hRes))
{
- throw std::system_error(GetLastError(), std::system_category(), "Failed to write to file" /* TODO: add context */);
+ throw std::system_error(GetLastError(), std::system_category(), "Failed to write to file '{}'"_format(zen::PathFromHandle(m_File)));
}
}