From 40df30d258ebfd24a447fababc649867c24513d8 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 10 Sep 2024 16:55:32 +0200 Subject: Split SystemException to handle Windows Windows has (at least) two error namespaces, both errno and GetLastResult(). These overlap, so it is important we keep track of which one we are dealing with. To make things extra problematic, the BSD socket API normally uses errno, but on Windows it has been mapped in to the GetLastResult() namespace. Try to keep better control of this by using separate classes for the namespaces. --- win/rfb_win32/WMPoller.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'win/rfb_win32/WMPoller.cxx') diff --git a/win/rfb_win32/WMPoller.cxx b/win/rfb_win32/WMPoller.cxx index 1e29d0c6..2c5917e9 100644 --- a/win/rfb_win32/WMPoller.cxx +++ b/win/rfb_win32/WMPoller.cxx @@ -57,7 +57,7 @@ bool rfb::win32::WMPoller::checkPollWindow(HWND w) { char buffer[128]; if (!GetClassName(w, buffer, 128)) - throw rdr::SystemException("unable to get window class:%u", GetLastError()); + throw rdr::Win32Exception("unable to get window class:%u", GetLastError()); if ((strcmp(buffer, "tty") != 0) && (strcmp(buffer, "ConsoleWindowClass") != 0)) { return false; -- cgit v1.2.3