diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-10-20 11:06:13 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-11-06 21:24:36 +0100 |
commit | 2b7857283b834391266e414adcff8c20f8fe3067 (patch) | |
tree | 146051a67b20b217593298eec695aafda89134f6 /vncviewer/Surface_Win32.cxx | |
parent | ed07250fef4e258d0d37d1c4e520db6d6c1e6fdb (diff) | |
download | tigervnc-2b7857283b834391266e414adcff8c20f8fe3067.tar.gz tigervnc-2b7857283b834391266e414adcff8c20f8fe3067.zip |
Use standard library naming for exceptions
This makes things more consistent since we mix with the standard library
exceptions so often.
Diffstat (limited to 'vncviewer/Surface_Win32.cxx')
-rw-r--r-- | vncviewer/Surface_Win32.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/vncviewer/Surface_Win32.cxx b/vncviewer/Surface_Win32.cxx index 67ba15c5..c992dbea 100644 --- a/vncviewer/Surface_Win32.cxx +++ b/vncviewer/Surface_Win32.cxx @@ -57,10 +57,10 @@ void Surface::draw(int src_x, int src_y, int dst_x, int dst_y, dc = CreateCompatibleDC(fl_gc); if (!dc) - throw rdr::Win32Exception("CreateCompatibleDC", GetLastError()); + throw rdr::win32_error("CreateCompatibleDC", GetLastError()); if (!SelectObject(dc, bitmap)) - throw rdr::Win32Exception("SelectObject", GetLastError()); + throw rdr::win32_error("SelectObject", GetLastError()); if (!BitBlt(fl_gc, dst_x, dst_y, dst_w, dst_h, dc, src_x, src_y, SRCCOPY)) { @@ -70,7 +70,7 @@ void Surface::draw(int src_x, int src_y, int dst_x, int dst_y, // with it. For now, we've only seen this error and for this function // so only ignore this combination. if (GetLastError() != ERROR_INVALID_HANDLE) - throw rdr::Win32Exception("BitBlt", GetLastError()); + throw rdr::win32_error("BitBlt", GetLastError()); } DeleteDC(dc); @@ -83,10 +83,10 @@ void Surface::draw(Surface* dst, int src_x, int src_y, dstdc = CreateCompatibleDC(nullptr); if (!dstdc) - throw rdr::Win32Exception("CreateCompatibleDC", GetLastError()); + throw rdr::win32_error("CreateCompatibleDC", GetLastError()); if (!SelectObject(dstdc, dst->bitmap)) - throw rdr::Win32Exception("SelectObject", GetLastError()); + throw rdr::win32_error("SelectObject", GetLastError()); origdc = fl_gc; fl_gc = dstdc; @@ -113,15 +113,15 @@ void Surface::blend(Surface* dst, int src_x, int src_y, dstdc = CreateCompatibleDC(nullptr); if (!dstdc) - throw rdr::Win32Exception("CreateCompatibleDC", GetLastError()); + throw rdr::win32_error("CreateCompatibleDC", GetLastError()); srcdc = CreateCompatibleDC(nullptr); if (!srcdc) - throw rdr::Win32Exception("CreateCompatibleDC", GetLastError()); + throw rdr::win32_error("CreateCompatibleDC", GetLastError()); if (!SelectObject(dstdc, dst->bitmap)) - throw rdr::Win32Exception("SelectObject", GetLastError()); + throw rdr::win32_error("SelectObject", GetLastError()); if (!SelectObject(srcdc, bitmap)) - throw rdr::Win32Exception("SelectObject", GetLastError()); + throw rdr::win32_error("SelectObject", GetLastError()); blend.BlendOp = AC_SRC_OVER; blend.BlendFlags = 0; @@ -136,7 +136,7 @@ void Surface::blend(Surface* dst, int src_x, int src_y, // with it. For now, we've only seen this error and for this function // so only ignore this combination. if (GetLastError() != ERROR_INVALID_HANDLE) - throw rdr::Win32Exception("BitBlt", GetLastError()); + throw rdr::win32_error("BitBlt", GetLastError()); } DeleteDC(srcdc); @@ -161,7 +161,7 @@ void Surface::alloc() bitmap = CreateDIBSection(nullptr, (BITMAPINFO*)&bih, DIB_RGB_COLORS, (void**)&data, nullptr, 0); if (!bitmap) - throw rdr::Win32Exception("CreateDIBSection", GetLastError()); + throw rdr::win32_error("CreateDIBSection", GetLastError()); } void Surface::dealloc() |