From 1cbd0a3b824d1821549b4c7ede688f500de25443 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 20 Sep 2020 00:09:34 +0300 Subject: pdb::error: include function name in error message --- src/utils/file.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/utils/file.cpp') 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}; } -- cgit v1.2.3