aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/file.cpp8
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};
}