aboutsummaryrefslogtreecommitdiff
path: root/zencore/except.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-17 23:07:45 +0200
committerStefan Boberg <[email protected]>2021-09-17 23:07:45 +0200
commita6244f914633a4245fc71a987cb42fce0b7d8671 (patch)
tree70cac0bafe9c4ce7a90d894659eb73a53b3ed865 /zencore/except.cpp
parentDon't sweep instance table in read-only mode (diff)
downloadzen-a6244f914633a4245fc71a987cb42fce0b7d8671.tar.xz
zen-a6244f914633a4245fc71a987cb42fce0b7d8671.zip
Added ThrowSystemError() helper
Diffstat (limited to 'zencore/except.cpp')
-rw-r--r--zencore/except.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/zencore/except.cpp b/zencore/except.cpp
index c06a26edd..44b8edffb 100644
--- a/zencore/except.cpp
+++ b/zencore/except.cpp
@@ -63,6 +63,12 @@ ThrowLastError(std::string_view Message)
throw std::system_error(std::error_code(zen::GetLastError(), std::system_category()), std::string(Message));
}
+void
+ThrowSystemError(uint32_t ErrorCode, std::string_view Message)
+{
+ throw std::system_error(std::error_code(ErrorCode, std::system_category()), std::string(Message));
+}
+
std::string
GetLastErrorAsString()
{