From: Pierre Ossman Date: Thu, 4 Nov 2021 08:00:33 +0000 (+0100) Subject: Throw more descriptive error on rect read error X-Git-Tag: v1.12.90~90 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0ce9fefde8c0b34eda0d6c2454abb8fece7e6e3c;p=tigervnc.git Throw more descriptive error on rect read error Gives a bit more context where this error happened. --- diff --git a/common/rfb/DecodeManager.cxx b/common/rfb/DecodeManager.cxx index 4f60cd59..720aabed 100644 --- a/common/rfb/DecodeManager.cxx +++ b/common/rfb/DecodeManager.cxx @@ -136,8 +136,12 @@ bool DecodeManager::decodeRect(const Rect& r, int encoding, // Read the rect bufferStream->clear(); - if (!decoder->readRect(r, conn->getInStream(), conn->server, bufferStream)) - return false; + try { + if (!decoder->readRect(r, conn->getInStream(), conn->server, bufferStream)) + return false; + } catch (rdr::Exception& e) { + throw Exception("Error reading rect: %s", e.str()); + } // Then try to put it on the queue entry = new QueueEntry;