aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/JpegDecompressor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/rfb/JpegDecompressor.cxx')
-rw-r--r--common/rfb/JpegDecompressor.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/rfb/JpegDecompressor.cxx b/common/rfb/JpegDecompressor.cxx
index 92ef014f..10c9e49c 100644
--- a/common/rfb/JpegDecompressor.cxx
+++ b/common/rfb/JpegDecompressor.cxx
@@ -24,7 +24,7 @@
#endif
#include <rfb/JpegDecompressor.h>
-#include <rdr/Exception.h>
+#include <rfb/Exception.h>
#include <rfb/Rect.h>
#include <rfb/PixelFormat.h>
@@ -120,7 +120,7 @@ JpegDecompressor::JpegDecompressor(void)
if(setjmp(err->jmpBuffer)) {
// this will execute if libjpeg has an error
- throw rdr::Exception("%s", err->lastError);
+ throw std::runtime_error(err->lastError);
}
jpeg_create_decompress(dinfo);
@@ -168,7 +168,7 @@ void JpegDecompressor::decompress(const uint8_t *jpegBuf,
jpeg_abort_decompress(dinfo);
if (dstBufIsTemp && dstBuf) delete[] dstBuf;
if (rowPointer) delete[] rowPointer;
- throw rdr::Exception("%s", err->lastError);
+ throw std::runtime_error(err->lastError);
}
src->pub.next_input_byte = jpegBuf;
@@ -217,7 +217,7 @@ void JpegDecompressor::decompress(const uint8_t *jpegBuf,
jpeg_abort_decompress(dinfo);
if (dstBufIsTemp && dstBuf) delete[] dstBuf;
if (rowPointer) delete[] rowPointer;
- throw rdr::Exception("Tight Decoding: Wrong JPEG data received.\n");
+ throw protocol_error("Tight Decoding: Wrong JPEG data received.\n");
}
while (dinfo->output_scanline < dinfo->output_height) {