From 451828874505f9c0676a4f87455bfe841a485429 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 23 Apr 2021 03:54:55 -0500 Subject: [PATCH] [ox/fs] Add more detail to log messages of PassThroughFS --- deps/ox/src/ox/fs/filesystem/passthroughfs.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp b/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp index 66367323..fbdd6b59 100644 --- a/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp +++ b/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp @@ -67,8 +67,8 @@ Error PassThroughFS::read(const char *path, void *buffer, std::size_t buffSize) return OxError(1); } file.read(static_cast(buffer), buffSize); - } catch (const std::fstream::failure&) { - oxTrace("ox::fs::PassThroughFS::read::error") << "Read failed:" << path; + } catch (const std::fstream::failure &f) { + oxTracef("ox::fs::PassThroughFS::read::error", "Read of {} failed: {}", path, f.what()); return OxError(2); } return OxError(0); @@ -122,8 +122,8 @@ Error PassThroughFS::write(const char *path, void *buffer, uint64_t size, uint8_ try { std::ofstream f(p, std::ios::binary); f.write(static_cast(buffer), size); - } catch (const std::fstream::failure&) { - oxTrace("ox::fs::PassThroughFS::write::error") << "Write failed:" << path; + } catch (const std::fstream::failure &f) { + oxTracef("ox::fs::PassThroughFS::read::error", "Write of {} failed: {}", path, f.what()); return OxError(1); } return OxError(0);