diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-09-20 00:09:34 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-09-20 00:12:50 +0300 |
commit | 1cbd0a3b824d1821549b4c7ede688f500de25443 (patch) | |
tree | d7771d4afeb9609758c9f632674081091f99ed67 /src/utils/file.cpp | |
parent | pdb::file: use wide WinAPI (diff) | |
download | winapi-debug-1cbd0a3b824d1821549b4c7ede688f500de25443.tar.gz winapi-debug-1cbd0a3b824d1821549b4c7ede688f500de25443.zip |
pdb::error: include function name in error message
Diffstat (limited to '')
-rw-r--r-- | src/utils/file.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/file.cpp b/src/utils/file.cpp index 8380fe9..fb106ec 100644 --- a/src/utils/file.cpp +++ b/src/utils/file.cpp @@ -27,12 +27,12 @@ std::size_t get_size(const std::string& path) { NULL)}; if (handle.get() == INVALID_HANDLE_VALUE) - throw error::windows(GetLastError()); + throw error::windows(GetLastError(), "CreateFileW"); LARGE_INTEGER size; if (!GetFileSizeEx(handle.get(), &size)) - throw error::windows(GetLastError()); + throw error::windows(GetLastError(), "GetFileSizeEx"); std::size_t result = 0; @@ -52,12 +52,12 @@ ID query_id(const std::string& path) { NULL)}; if (handle.get() == INVALID_HANDLE_VALUE) - throw error::windows(GetLastError()); + throw error::windows(GetLastError(), "CreateFileW"); FILE_ID_INFO id; if (!GetFileInformationByHandleEx(handle.get(), FileIdInfo, &id, sizeof(id))) - throw error::windows(GetLastError()); + throw error::windows(GetLastError(), "GetFileInformationByHandleEx"); return {id}; } |