diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-09-02 22:58:35 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-11-06 21:06:27 +0100 |
commit | 1d9b2f9984fefbc050c8e3295397ffd280e41788 (patch) | |
tree | c6fa8a4f5e0e6fbc0e165c2bd80b2c81a48bf6bc /common/rfb/CSecurityTLS.cxx | |
parent | 5c3588c464520a4757bfc20974090e21af220cdc (diff) | |
download | tigervnc-1d9b2f9984fefbc050c8e3295397ffd280e41788.tar.gz tigervnc-1d9b2f9984fefbc050c8e3295397ffd280e41788.zip |
Use standard exception classes
Use the more specific already included exception classes for common
errors to keep things more understandable.
Diffstat (limited to 'common/rfb/CSecurityTLS.cxx')
-rw-r--r-- | common/rfb/CSecurityTLS.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx index 2722415b..ae916139 100644 --- a/common/rfb/CSecurityTLS.cxx +++ b/common/rfb/CSecurityTLS.cxx @@ -387,8 +387,8 @@ void CSecurityTLS::checkSession() hostsDir = os::getvncstatedir(); if (hostsDir == nullptr) { - throw Exception("Could not obtain VNC state directory path for " - "known hosts storage"); + throw std::runtime_error("Could not obtain VNC state directory " + "path for known hosts storage"); } std::string dbPath; @@ -509,7 +509,7 @@ void CSecurityTLS::checkSession() if (status != 0) { vlog.error("Unhandled certificate problems: 0x%x", status); - throw Exception("Unhandled certificate problems"); + throw std::logic_error("Unhandled certificate problems"); } if (!hostname_match) { @@ -625,7 +625,7 @@ void CSecurityTLS::checkSession() if (status != 0) { vlog.error("Unhandled certificate problems: 0x%x", status); - throw Exception("Unhandled certificate problems"); + throw std::logic_error("Unhandled certificate problems"); } if (!hostname_match) { |