diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-09-02 16:17:31 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-11-06 21:06:22 +0100 |
commit | 158eb92c4bc4ec7cdedabd9b192648627513c518 (patch) | |
tree | 61dd50a0bcae0c86459053fcc46c913dee81b701 /common/rfb/DecodeManager.cxx | |
parent | 067d0e89bf344609ec202f895252411c8fcaec1c (diff) | |
download | tigervnc-158eb92c4bc4ec7cdedabd9b192648627513c518.tar.gz tigervnc-158eb92c4bc4ec7cdedabd9b192648627513c518.zip |
Use static string for exceptions
In preparation for using the built in C++ exception classes, which do
not accept a format string.
Diffstat (limited to 'common/rfb/DecodeManager.cxx')
-rw-r--r-- | common/rfb/DecodeManager.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/rfb/DecodeManager.cxx b/common/rfb/DecodeManager.cxx index ef415886..269e818d 100644 --- a/common/rfb/DecodeManager.cxx +++ b/common/rfb/DecodeManager.cxx @@ -149,7 +149,7 @@ bool DecodeManager::decodeRect(const Rect& r, int encoding, if (!decoder->readRect(r, conn->getInStream(), conn->server, bufferStream)) return false; } catch (rdr::Exception& e) { - throw Exception("Error reading rect: %s", e.str()); + throw Exception(format("Error reading rect: %s", e.str())); } stats[encoding].rects++; @@ -250,7 +250,7 @@ void DecodeManager::setThreadException(const rdr::Exception& e) if (threadException != nullptr) return; - threadException = new rdr::Exception("Exception on worker thread: %s", e.str()); + threadException = new rdr::Exception(format("Exception on worker thread: %s", e.str())); } void DecodeManager::throwThreadException() |