aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/JpegCompressor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/rfb/JpegCompressor.cxx')
-rw-r--r--common/rfb/JpegCompressor.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/common/rfb/JpegCompressor.cxx b/common/rfb/JpegCompressor.cxx
index 49ed4b61..67a86cd9 100644
--- a/common/rfb/JpegCompressor.cxx
+++ b/common/rfb/JpegCompressor.cxx
@@ -22,8 +22,9 @@
#include <config.h>
#endif
+#include <stdexcept>
+
#include <rfb/JpegCompressor.h>
-#include <rdr/Exception.h>
#include <rfb/Rect.h>
#include <rfb/PixelFormat.h>
#include <rfb/ClientParams.h>
@@ -127,7 +128,7 @@ JpegCompressor::JpegCompressor(int bufferLen) : MemOutStream(bufferLen)
if(setjmp(err->jmpBuffer)) {
// this will execute if libjpeg has an error
- throw rdr::Exception(err->lastError);
+ throw std::runtime_error(err->lastError);
}
jpeg_create_compress(cinfo);
@@ -171,7 +172,7 @@ void JpegCompressor::compress(const uint8_t *buf, volatile int stride,
jpeg_abort_compress(cinfo);
if (srcBufIsTemp && srcBuf) delete[] srcBuf;
if (rowPointer) delete[] rowPointer;
- throw rdr::Exception(err->lastError);
+ throw std::runtime_error(err->lastError);
}
cinfo->image_width = w;
@@ -256,5 +257,5 @@ void JpegCompressor::compress(const uint8_t *buf, volatile int stride,
void JpegCompressor::writeBytes(const uint8_t* /*data*/, int /*length*/)
{
- throw rdr::Exception("writeBytes() is not valid with a JpegCompressor instance. Use compress() instead.");
+ throw std::logic_error("writeBytes() is not valid with a JpegCompressor instance. Use compress() instead.");
}