diff options
| author | Dan Engelbrecht <[email protected]> | 2024-04-26 12:48:29 +0200 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2024-04-26 12:48:29 +0200 |
| commit | f3affd5954ecde72c046150ac737f2b1416cbc3a (patch) | |
| tree | 27f5ae8bca59a6c5207ee8cbbf15ee50eabb74a2 /src | |
| parent | add generic read file streaming in http client (diff) | |
| download | zen-de/httpclient-send-refactor.tar.xz zen-de/httpclient-send-refactor.zip | |
error fix in ReadFileRangede/httpclient-send-refactor
Diffstat (limited to 'src')
| -rw-r--r-- | src/zencore/filesystem.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/zencore/filesystem.cpp b/src/zencore/filesystem.cpp index 6fdea31e1..dda1abb06 100644 --- a/src/zencore/filesystem.cpp +++ b/src/zencore/filesystem.cpp @@ -1062,12 +1062,13 @@ ReadFileRange(void* NativeHandle, uint64_t Offset, uint64_t Size, void* OutData) if (Error) { std::error_code DummyEc; - ZEN_WARN("ReadFile/pread failed (offset {:#x}, size {:#x}) file: '{}' (size {:#x})", + ZEN_WARN("ReadFile/pread failed with {} (offset {:#x}, size {:#x}) file: '{}' (size {:#x})", + Error, Offset, Size, PathFromHandle(NativeHandle, DummyEc), FileSizeFromHandle(NativeHandle)); - throw std::system_error(std::error_code(::GetLastError(), std::system_category()), + throw std::system_error(std::error_code(Error, std::system_category()), fmt::format("ReadFile failed (offset {:#x}, size {:#x}) file: '{}' (size {:#x})", Offset, Size, |