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/obfuscate.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/obfuscate.cxx')
-rw-r--r-- | common/rfb/obfuscate.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/rfb/obfuscate.cxx b/common/rfb/obfuscate.cxx index 2afc1512..a88d2822 100644 --- a/common/rfb/obfuscate.cxx +++ b/common/rfb/obfuscate.cxx @@ -28,11 +28,12 @@ #include <assert.h> #include <string.h> +#include <stdexcept> + extern "C" { #include <rfb/d3des.h> } -#include <rdr/Exception.h> #include <rfb/obfuscate.h> static unsigned char d3desObfuscationKey[] = {23,82,107,6,35,78,88,7}; @@ -57,7 +58,7 @@ std::string rfb::deobfuscate(const uint8_t *data, size_t len) char buf[9]; if (len != 8) - throw rdr::Exception("bad obfuscated password length"); + throw std::invalid_argument("bad obfuscated password length"); assert(data != nullptr); |