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/ZlibInStream.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/ZlibInStream.cxx')
-rw-r--r-- | common/rdr/ZlibInStream.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/common/rdr/ZlibInStream.cxx b/common/rdr/ZlibInStream.cxx index a90d50f7..c9f8aeca 100644 --- a/common/rdr/ZlibInStream.cxx +++ b/common/rdr/ZlibInStream.cxx @@ -23,7 +23,6 @@ #include <assert.h> #include <rdr/ZlibInStream.h> -#include <rdr/Exception.h> #include <zlib.h> using namespace rdr; @@ -50,7 +49,7 @@ void ZlibInStream::flushUnderlying() { while (bytesIn > 0) { if (!hasData(1)) - throw Exception("ZlibInStream: failed to flush remaining stream data"); + throw std::runtime_error("ZlibInStream: failed to flush remaining stream data"); skip(avail()); } @@ -76,7 +75,7 @@ void ZlibInStream::init() if (inflateInit(zs) != Z_OK) { delete zs; zs = nullptr; - throw Exception("ZlibInStream: inflateInit failed"); + throw std::runtime_error("ZlibInStream: inflateInit failed"); } } @@ -92,7 +91,7 @@ void ZlibInStream::deinit() bool ZlibInStream::fillBuffer() { if (!underlying) - throw Exception("ZlibInStream overrun: no underlying stream"); + throw std::runtime_error("ZlibInStream overrun: no underlying stream"); zs->next_out = (uint8_t*)end; zs->avail_out = availSpace(); @@ -107,7 +106,7 @@ bool ZlibInStream::fillBuffer() int rc = inflate(zs, Z_SYNC_FLUSH); if (rc < 0) { - throw Exception("ZlibInStream: inflate failed"); + throw std::runtime_error("ZlibInStream: inflate failed"); } bytesIn -= length - zs->avail_in; |