aboutsummaryrefslogtreecommitdiffstats
path: root/win/rfb_win32/CleanDesktop.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2024-11-07 10:37:53 +0100
committerPierre Ossman <ossman@cendio.se>2024-11-07 10:37:53 +0100
commitf7507aea98b1a428d02fe5c41d25ee69dd5436bb (patch)
tree49f9349a1d7441874d1cb6d4428e2bcb0d63b422 /win/rfb_win32/CleanDesktop.cxx
parent7508e9887de022e127d8fadb9f6a6bd8e9778864 (diff)
parent2b7857283b834391266e414adcff8c20f8fe3067 (diff)
downloadtigervnc-f7507aea98b1a428d02fe5c41d25ee69dd5436bb.tar.gz
tigervnc-f7507aea98b1a428d02fe5c41d25ee69dd5436bb.zip
Merge branch 'stdexcept' of github.com:CendioOssman/tigervnc
Diffstat (limited to 'win/rfb_win32/CleanDesktop.cxx')
-rw-r--r--win/rfb_win32/CleanDesktop.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/win/rfb_win32/CleanDesktop.cxx b/win/rfb_win32/CleanDesktop.cxx
index 6d933b22..02fdd374 100644
--- a/win/rfb_win32/CleanDesktop.cxx
+++ b/win/rfb_win32/CleanDesktop.cxx
@@ -45,7 +45,7 @@ struct ActiveDesktop {
HRESULT result = CoCreateInstance(CLSID_ActiveDesktop, nullptr, CLSCTX_INPROC_SERVER,
IID_IActiveDesktop, (PVOID*)&handle);
if (result != S_OK)
- throw rdr::Win32Exception("failed to contact Active Desktop", HRESULT_CODE(result));
+ throw rdr::win32_error("failed to contact Active Desktop", HRESULT_CODE(result));
}
~ActiveDesktop() {
if (handle)
@@ -173,16 +173,16 @@ void CleanDesktop::disableWallpaper() {
ActiveDesktop ad;
if (ad.enable(false))
restoreActiveDesktop = true;
- } catch (rdr::Exception& e) {
- vlog.error("%s", e.str());
+ } catch (std::exception& e) {
+ vlog.error("%s", e.what());
}
// -=- Switch of normal wallpaper and notify apps
SysParamsInfo(SPI_SETDESKWALLPAPER, 0, (PVOID) "", SPIF_SENDCHANGE);
restoreWallpaper = true;
- } catch (rdr::Exception& e) {
- vlog.info("%s", e.str());
+ } catch (std::exception& e) {
+ vlog.info("%s", e.what());
}
}
@@ -198,8 +198,8 @@ void CleanDesktop::enableWallpaper() {
ActiveDesktop ad;
ad.enable(true);
restoreActiveDesktop = false;
- } catch (rdr::Exception& e) {
- vlog.error("%s", e.str());
+ } catch (std::exception& e) {
+ vlog.error("%s", e.what());
}
}
@@ -211,8 +211,8 @@ void CleanDesktop::enableWallpaper() {
restoreWallpaper = false;
}
- } catch (rdr::Exception& e) {
- vlog.info("%s", e.str());
+ } catch (std::exception& e) {
+ vlog.info("%s", e.what());
}
}
@@ -243,8 +243,8 @@ void CleanDesktop::disableEffects() {
}
restoreEffects = true;
- } catch (rdr::Exception& e) {
- vlog.info("%s", e.str());
+ } catch (std::exception& e) {
+ vlog.info("%s", e.what());
}
}
@@ -268,7 +268,7 @@ void CleanDesktop::enableEffects() {
restoreEffects = false;
}
- } catch (rdr::Exception& e) {
- vlog.info("%s", e.str());
+ } catch (std::exception& e) {
+ vlog.info("%s", e.what());
}
}