aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/ClientParams.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2024-11-07 10:37:53 +0100
committerPierre Ossman <ossman@cendio.se>2024-11-07 10:37:53 +0100
commitf7507aea98b1a428d02fe5c41d25ee69dd5436bb (patch)
tree49f9349a1d7441874d1cb6d4428e2bcb0d63b422 /common/rfb/ClientParams.cxx
parent7508e9887de022e127d8fadb9f6a6bd8e9778864 (diff)
parent2b7857283b834391266e414adcff8c20f8fe3067 (diff)
downloadtigervnc-f7507aea98b1a428d02fe5c41d25ee69dd5436bb.tar.gz
tigervnc-f7507aea98b1a428d02fe5c41d25ee69dd5436bb.zip
Merge branch 'stdexcept' of github.com:CendioOssman/tigervnc
Diffstat (limited to 'common/rfb/ClientParams.cxx')
-rw-r--r--common/rfb/ClientParams.cxx10
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)