From 06f28d4054b259b95be0cb2862fcd78010e5a905 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Fri, 1 Dec 2006 13:14:15 +0000 Subject: Fix to test. Throw exception where previously printed warning. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@481235 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/lib/broker/BrokerMessage.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'cpp/lib/broker/BrokerMessage.cpp') diff --git a/cpp/lib/broker/BrokerMessage.cpp b/cpp/lib/broker/BrokerMessage.cpp index 7fa1444a9e..50bf319797 100644 --- a/cpp/lib/broker/BrokerMessage.cpp +++ b/cpp/lib/broker/BrokerMessage.cpp @@ -140,6 +140,7 @@ void Message::decodeContent(Buffer& buffer, u_int32_t chunkSize) u_int64_t expected = expectedContentSize(); if (expected != buffer.available()) { std::cout << "WARN: Expected " << expectedContentSize() << " bytes, got " << buffer.available() << std::endl; + throw Exception("Cannot decode content, buffer not large enough."); } if (!chunkSize || chunkSize > expected) { -- cgit v1.2.1