diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-11-07 10:37:53 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-11-07 10:37:53 +0100 |
commit | f7507aea98b1a428d02fe5c41d25ee69dd5436bb (patch) | |
tree | 49f9349a1d7441874d1cb6d4428e2bcb0d63b422 /common/rdr/ZlibOutStream.cxx | |
parent | 7508e9887de022e127d8fadb9f6a6bd8e9778864 (diff) | |
parent | 2b7857283b834391266e414adcff8c20f8fe3067 (diff) | |
download | tigervnc-f7507aea98b1a428d02fe5c41d25ee69dd5436bb.tar.gz tigervnc-f7507aea98b1a428d02fe5c41d25ee69dd5436bb.zip |
Merge branch 'stdexcept' of github.com:CendioOssman/tigervnc
Diffstat (limited to 'common/rdr/ZlibOutStream.cxx')
-rw-r--r-- | common/rdr/ZlibOutStream.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/common/rdr/ZlibOutStream.cxx b/common/rdr/ZlibOutStream.cxx index 0b167711..13788f8d 100644 --- a/common/rdr/ZlibOutStream.cxx +++ b/common/rdr/ZlibOutStream.cxx @@ -24,7 +24,6 @@ #include <stdio.h> #include <rdr/ZlibOutStream.h> -#include <rdr/Exception.h> #include <rfb/LogWriter.h> #include <zlib.h> @@ -46,7 +45,7 @@ ZlibOutStream::ZlibOutStream(OutStream* os, int compressLevel) zs->avail_in = 0; if (deflateInit(zs, compressLevel) != Z_OK) { delete zs; - throw Exception("ZlibOutStream: deflateInit failed"); + throw std::runtime_error("ZlibOutStream: deflateInit failed"); } } @@ -54,7 +53,7 @@ ZlibOutStream::~ZlibOutStream() { try { flush(); - } catch (Exception&) { + } catch (std::exception&) { } deflateEnd(zs); delete zs; @@ -113,7 +112,7 @@ void ZlibOutStream::deflate(int flush) int rc; if (!underlying) - throw Exception("ZlibOutStream: underlying OutStream has not been set"); + throw std::runtime_error("ZlibOutStream: underlying OutStream has not been set"); if ((flush == Z_NO_FLUSH) && (zs->avail_in == 0)) return; @@ -134,7 +133,7 @@ void ZlibOutStream::deflate(int flush) if ((rc == Z_BUF_ERROR) && (flush != Z_NO_FLUSH)) break; - throw Exception("ZlibOutStream: deflate failed"); + throw std::runtime_error("ZlibOutStream: deflate failed"); } #ifdef ZLIBOUT_DEBUG @@ -168,7 +167,7 @@ void ZlibOutStream::checkCompressionLevel() // explicit flush we did above. It should be safe to ignore though // as the first flush should have left things in a stable state... if (rc != Z_BUF_ERROR) - throw Exception("ZlibOutStream: deflateParams failed"); + throw std::runtime_error("ZlibOutStream: deflateParams failed"); } compressionLevel = newLevel; |