aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/ClientParams.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/rfb/ClientParams.cxx')
-rw-r--r--common/rfb/ClientParams.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/common/rfb/ClientParams.cxx b/common/rfb/ClientParams.cxx
index 3f80f109..495b4bd1 100644
--- a/common/rfb/ClientParams.cxx
+++ b/common/rfb/ClientParams.cxx
@@ -22,7 +22,8 @@
#include <config.h>
#endif
-#include <rfb/Exception.h>
+#include <stdexcept>
+
#include <rfb/encodings.h>
#include <rfb/ledStates.h>
#include <rfb/clipboardTypes.h>
@@ -63,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;
@@ -75,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)
@@ -161,7 +162,7 @@ uint32_t ClientParams::clipboardSize(unsigned int format) const
return clipSizes[i];
}
- throw Exception(rfb::format("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)