aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr/BufferedInStream.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/rdr/BufferedInStream.cxx')
-rw-r--r--common/rdr/BufferedInStream.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/common/rdr/BufferedInStream.cxx b/common/rdr/BufferedInStream.cxx
index 204202ec..bf94a950 100644
--- a/common/rdr/BufferedInStream.cxx
+++ b/common/rdr/BufferedInStream.cxx
@@ -24,7 +24,6 @@
#include <assert.h>
#include <rdr/BufferedInStream.h>
-#include <rdr/Exception.h>
#include <rfb/util.h>
@@ -65,10 +64,12 @@ void BufferedInStream::ensureSpace(size_t needed)
uint8_t* newBuffer;
if (needed > MAX_BUF_SIZE)
- throw Exception(rfb::format("BufferedInStream overrun: requested "
- "size of %lu bytes exceeds maximum "
- "of %lu bytes", (long unsigned)needed,
- (long unsigned)MAX_BUF_SIZE));
+ throw std::out_of_range(rfb::format("BufferedInStream overrun: "
+ "requested size of %lu bytes "
+ "exceeds maximum of %lu "
+ "bytes",
+ (long unsigned)needed,
+ (long unsigned)MAX_BUF_SIZE));
newSize = DEFAULT_BUF_SIZE;
while (newSize < needed)