diff options
Diffstat (limited to 'zenstore/caslog.cpp')
| -rw-r--r-- | zenstore/caslog.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/zenstore/caslog.cpp b/zenstore/caslog.cpp index 4b9aacb42..0ef3ed1bd 100644 --- a/zenstore/caslog.cpp +++ b/zenstore/caslog.cpp @@ -125,7 +125,10 @@ CasLogFile::Replay(std::function<void(const void*)>&& Handler) m_File.Seek(LogBaseOffset, FILE_BEGIN); HRESULT hRes = m_File.Read(ReadBuffer.data(), gsl::narrow<DWORD>(LogDataSize)); - zen::ThrowIfFailed(hRes, "Failed to read log file"); + if (FAILED(hRes)) + { + zen::ThrowSystemException(hRes, "Failed to read log file"); + } for (int i = 0; i < LogEntryCount; ++i) { @@ -140,9 +143,7 @@ CasLogFile::Append(const void* DataPointer, uint64_t DataSize) if (FAILED(hRes)) { - throw std::system_error(GetLastError(), - std::system_category(), - "Failed to write to log file '{}'"_format(zen::PathFromHandle(m_File))); + zen::ThrowSystemException(hRes, "Failed to write to log file '{}'"_format(zen::PathFromHandle(m_File))); } } |