diff options
Diffstat (limited to 'common/rfb/ClientParams.cxx')
-rw-r--r-- | common/rfb/ClientParams.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/common/rfb/ClientParams.cxx b/common/rfb/ClientParams.cxx index bc20c3d7..495b4bd1 100644 --- a/common/rfb/ClientParams.cxx +++ b/common/rfb/ClientParams.cxx @@ -22,11 +22,13 @@ #include <config.h> #endif -#include <rfb/Exception.h> +#include <stdexcept> + #include <rfb/encodings.h> #include <rfb/ledStates.h> #include <rfb/clipboardTypes.h> #include <rfb/ClientParams.h> +#include <rfb/util.h> using namespace rfb; @@ -62,7 +64,7 @@ void ClientParams::setDimensions(int width, int height) void ClientParams::setDimensions(int width, int height, const ScreenSet& layout) { if (!layout.validate(width, height)) - throw Exception("Attempted to configure an invalid screen layout"); + throw std::invalid_argument("Attempted to configure an invalid screen layout"); width_ = width; height_ = height; @@ -74,7 +76,7 @@ void ClientParams::setPF(const PixelFormat& pf) pf_ = pf; if (pf.bpp != 8 && pf.bpp != 16 && pf.bpp != 32) - throw Exception("setPF: not 8, 16 or 32 bpp?"); + throw std::invalid_argument("setPF: not 8, 16 or 32 bpp?"); } void ClientParams::setName(const char* name) @@ -160,7 +162,7 @@ uint32_t ClientParams::clipboardSize(unsigned int format) const return clipSizes[i]; } - throw Exception("Invalid clipboard format 0x%x", format); + throw std::invalid_argument(rfb::format("Invalid clipboard format 0x%x", format)); } void ClientParams::setClipboardCaps(uint32_t flags, const uint32_t* lengths) |