From c55df8f9cdded0da0dc6a4d6a42e043e46e9b27f Mon Sep 17 00:00:00 2001 From: Martin Ridgers Date: Wed, 15 Sep 2021 12:51:01 +0200 Subject: GetWindowsErrorAsString() -> GetErrorAsString() --- zencore/except.cpp | 6 +++--- zencore/include/zencore/except.h | 2 +- zenhttp/httpsys.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/zencore/except.cpp b/zencore/except.cpp index d57b539cd..123d8e231 100644 --- a/zencore/except.cpp +++ b/zencore/except.cpp @@ -31,13 +31,13 @@ ThrowLastError(std::string_view Message) std::string GetLastErrorAsString() { - return GetWindowsErrorAsString(zen::GetLastError()); + return GetErrorAsString(zen::GetLastError()); } std::string -GetWindowsErrorAsString(uint32_t Win32ErrorCode) +GetErrorAsString(uint32_t ErrorCode) { - return std::error_code(Win32ErrorCode, std::system_category()).message(); + return std::error_code(ErrorCode, std::system_category()).message(); } void diff --git a/zencore/include/zencore/except.h b/zencore/include/zencore/except.h index 486f3e380..5e0f580f2 100644 --- a/zencore/include/zencore/except.h +++ b/zencore/include/zencore/except.h @@ -56,7 +56,7 @@ ZENCORE_API void ThrowSystemException(HRESULT hRes, std::string_view Message); ZENCORE_API void ThrowLastError(std::string_view Message); ZENCORE_API void ThrowLastError(std::string_view Message, const std::source_location& Location); ZENCORE_API std::string GetLastErrorAsString(); -ZENCORE_API std::string GetWindowsErrorAsString(uint32_t Win32ErrorCode); +ZENCORE_API std::string GetErrorAsString(uint32_t ErrorCode); inline void ThrowSystemException(const char* Message) diff --git a/zenhttp/httpsys.cpp b/zenhttp/httpsys.cpp index e8da9cb90..80e1b8ee9 100644 --- a/zenhttp/httpsys.cpp +++ b/zenhttp/httpsys.cpp @@ -418,7 +418,7 @@ HttpMessageResponseRequest::HandleCompletion(ULONG IoResult, ULONG_PTR NumberOfB if (IoResult) { - ZEN_WARN("response aborted due to error: '{}'", GetWindowsErrorAsString(IoResult)); + ZEN_WARN("response aborted due to error: '{}'", GetErrorAsString(IoResult)); // if one transmit failed there's really no need to go on return nullptr; -- cgit v1.2.3