aboutsummaryrefslogtreecommitdiff
path: root/zencore/except.cpp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-09-15 12:32:52 +0200
committerMartin Ridgers <[email protected]>2021-09-15 12:32:52 +0200
commite50c0ad976ed0d284b3984e5aa513987af3d32ec (patch)
treec9f52e019592a8a0e9a32716c8aea286bd67b7da /zencore/except.cpp
parentRemoved constexpr for anything that uses GetSize() (diff)
downloadzen-e50c0ad976ed0d284b3984e5aa513987af3d32ec.tar.xz
zen-e50c0ad976ed0d284b3984e5aa513987af3d32ec.zip
Cross-platform zen::GetLastError()
Diffstat (limited to 'zencore/except.cpp')
-rw-r--r--zencore/except.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/zencore/except.cpp b/zencore/except.cpp
index 9bd447308..609a5387e 100644
--- a/zencore/except.cpp
+++ b/zencore/except.cpp
@@ -22,13 +22,13 @@ ThrowSystemException([[maybe_unused]] HRESULT hRes, [[maybe_unused]] std::string
void
ThrowLastError(std::string_view Message)
{
- throw std::system_error(std::error_code(::GetLastError(), std::system_category()), std::string(Message));
+ throw std::system_error(std::error_code(zen::GetLastError(), std::system_category()), std::string(Message));
}
std::string
GetLastErrorAsString()
{
- return GetWindowsErrorAsString(::GetLastError());
+ return GetWindowsErrorAsString(zen::GetLastError());
}
std::string
@@ -41,7 +41,7 @@ void
ThrowLastError(std::string_view Message, const std::source_location& Location)
{
using namespace fmt::literals;
- throw std::system_error(std::error_code(::GetLastError(), std::system_category()),
+ throw std::system_error(std::error_code(zen::GetLastError(), std::system_category()),
"{}({}): {}"_format(Location.file_name(), Location.line(), Message));
}