diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-11-07 10:37:53 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-11-07 10:37:53 +0100 |
commit | f7507aea98b1a428d02fe5c41d25ee69dd5436bb (patch) | |
tree | 49f9349a1d7441874d1cb6d4428e2bcb0d63b422 /win/vncconfig/Legacy.cxx | |
parent | 7508e9887de022e127d8fadb9f6a6bd8e9778864 (diff) | |
parent | 2b7857283b834391266e414adcff8c20f8fe3067 (diff) | |
download | tigervnc-f7507aea98b1a428d02fe5c41d25ee69dd5436bb.tar.gz tigervnc-f7507aea98b1a428d02fe5c41d25ee69dd5436bb.zip |
Merge branch 'stdexcept' of github.com:CendioOssman/tigervnc
Diffstat (limited to 'win/vncconfig/Legacy.cxx')
-rw-r--r-- | win/vncconfig/Legacy.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/win/vncconfig/Legacy.cxx b/win/vncconfig/Legacy.cxx index 9300bb05..c6b245cc 100644 --- a/win/vncconfig/Legacy.cxx +++ b/win/vncconfig/Legacy.cxx @@ -42,7 +42,7 @@ void LegacyPage::LoadPrefs() std::string username; try { username = UserName(); - } catch (rdr::Win32Exception& e) { + } catch (rdr::win32_error& e) { if (e.err != ERROR_NOT_LOGGED_ON) throw; } @@ -85,7 +85,7 @@ void LegacyPage::LoadPrefs() if (bits) strcat(pattern, "."); if (parts[j].size() > 3) - throw rdr::Exception("Invalid IP address part"); + throw std::invalid_argument("Invalid IP address part"); if (!parts[j].empty()) { strcat(pattern, parts[j].c_str()); bits += 8; @@ -114,7 +114,7 @@ void LegacyPage::LoadPrefs() // Finally, save the Hosts value regKey.setString("Hosts", newHosts.c_str()); - } catch (rdr::Exception&) { + } catch (std::exception&) { MsgBox(nullptr, "Unable to convert AuthHosts setting to Hosts format.", MB_ICONWARNING | MB_OK); } @@ -135,7 +135,7 @@ void LegacyPage::LoadPrefs() regKey.setBool("AlwaysShared", connectPriority == 1); regKey.setBool("NeverShared", connectPriority == 2); - } catch(rdr::Exception&) { + } catch(std::exception&) { } // Open the local, default-user settings @@ -145,8 +145,8 @@ void LegacyPage::LoadPrefs() userKey.openKey(winvnc3, "Default"); vlog.info("loading Default prefs"); LoadUserPrefs(userKey); - } catch(rdr::Exception& e) { - vlog.error("error reading Default settings:%s", e.str()); + } catch(std::exception& e) { + vlog.error("error reading Default settings:%s", e.what()); } // Open the local, user-specific settings @@ -156,8 +156,8 @@ void LegacyPage::LoadPrefs() userKey.openKey(winvnc3, username.c_str()); vlog.info("loading local User prefs"); LoadUserPrefs(userKey); - } catch(rdr::Exception& e) { - vlog.error("error reading local User settings:%s", e.str()); + } catch(std::exception& e) { + vlog.error("error reading local User settings:%s", e.what()); } // Open the user's own settings @@ -167,8 +167,8 @@ void LegacyPage::LoadPrefs() userKey.openKey(HKEY_CURRENT_USER, "Software\\ORL\\WinVNC3"); vlog.info("loading global User prefs"); LoadUserPrefs(userKey); - } catch(rdr::Exception& e) { - vlog.error("error reading global User settings:%s", e.str()); + } catch(std::exception& e) { + vlog.error("error reading global User settings:%s", e.what()); } } } |