From 9d6db01fc03225403d3e3b00e93b3060ec1c3d1c 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@481235 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/lib/broker/BrokerMessage.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'qpid/cpp/lib') diff --git a/qpid/cpp/lib/broker/BrokerMessage.cpp b/qpid/cpp/lib/broker/BrokerMessage.cpp index 7fa1444a9e..50bf319797 100644 --- a/qpid/cpp/lib/broker/BrokerMessage.cpp +++ b/qpid/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