Browse Source

Throw more descriptive error on rect read error

Gives a bit more context where this error happened.
tags/v1.12.90
Pierre Ossman 2 years ago
parent
commit
0ce9fefde8
1 changed files with 6 additions and 2 deletions
  1. 6
    2
      common/rfb/DecodeManager.cxx

+ 6
- 2
common/rfb/DecodeManager.cxx View File

@@ -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;

Loading…
Cancel
Save