aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/TightDecoder.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/rfb/TightDecoder.cxx')
-rw-r--r--common/rfb/TightDecoder.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/rfb/TightDecoder.cxx b/common/rfb/TightDecoder.cxx
index 89d2e839..ff05b279 100644
--- a/common/rfb/TightDecoder.cxx
+++ b/common/rfb/TightDecoder.cxx
@@ -104,14 +104,14 @@ bool TightDecoder::readRect(const Rect& r, rdr::InStream* is,
// Quit on unsupported compression type.
if (comp_ctl > tightMaxSubencoding)
- throw Exception("TightDecoder: bad subencoding value received");
+ throw ProtocolException("TightDecoder: bad subencoding value received");
// "Basic" compression type.
int palSize = 0;
if (r.width() > TIGHT_MAX_WIDTH)
- throw Exception(format("TightDecoder: too large rectangle (%d pixels)", r.width()));
+ throw ProtocolException(format("TightDecoder: too large rectangle (%d pixels)", r.width()));
// Possible palette
if ((comp_ctl & tightExplicitFilter) != 0) {
@@ -143,12 +143,12 @@ bool TightDecoder::readRect(const Rect& r, rdr::InStream* is,
break;
case tightFilterGradient:
if (server.pf().bpp == 8)
- throw Exception("TightDecoder: invalid BPP for gradient filter");
+ throw ProtocolException("TightDecoder: invalid BPP for gradient filter");
break;
case tightFilterCopy:
break;
default:
- throw Exception("TightDecoder: unknown filter code received");
+ throw ProtocolException("TightDecoder: unknown filter code received");
}
}
@@ -384,7 +384,7 @@ void TightDecoder::decodeRect(const Rect& r, const uint8_t* buffer,
netbuf = new uint8_t[dataSize];
if (!zis[streamId].hasData(dataSize))
- throw Exception("Tight decode error");
+ throw ProtocolException("Tight decode error");
zis[streamId].readBytes(netbuf, dataSize);
zis[streamId].flushUnderlying();