aboutsummaryrefslogtreecommitdiff
path: root/zencore/except.cpp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-09-15 09:22:32 +0200
committerMartin Ridgers <[email protected]>2021-09-15 09:23:33 +0200
commit8f5e773529858223beeecf5d1b69c23991df644e (patch)
tree2c360c67e028f5ecd7368212b0adf8b23578ff9d /zencore/except.cpp
parentUse zen::Sleep() in timer.cpp's tests (diff)
parentUpdated function service to new package management API (diff)
downloadzen-8f5e773529858223beeecf5d1b69c23991df644e.tar.xz
zen-8f5e773529858223beeecf5d1b69c23991df644e.zip
Merge main
Diffstat (limited to 'zencore/except.cpp')
-rw-r--r--zencore/except.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/zencore/except.cpp b/zencore/except.cpp
index 00cb826f6..9bd447308 100644
--- a/zencore/except.cpp
+++ b/zencore/except.cpp
@@ -28,7 +28,13 @@ ThrowLastError(std::string_view Message)
std::string
GetLastErrorAsString()
{
- throw std::error_code(::GetLastError(), std::system_category()).message();
+ return GetWindowsErrorAsString(::GetLastError());
+}
+
+std::string
+GetWindowsErrorAsString(uint32_t Win32ErrorCode)
+{
+ return std::error_code(Win32ErrorCode, std::system_category()).message();
}
void