summaryrefslogtreecommitdiff
path: root/qpid/cpp/lib/broker/BrokerMessage.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2006-12-01 13:14:15 +0000
committerGordon Sim <gsim@apache.org>2006-12-01 13:14:15 +0000
commit9d6db01fc03225403d3e3b00e93b3060ec1c3d1c (patch)
tree85fdf1337271aac9b681f31d12004088d6fdf9e3 /qpid/cpp/lib/broker/BrokerMessage.cpp
parent8b43d5387fe0fa5039b538fc0fc5294ec8da6f08 (diff)
downloadqpid-python-9d6db01fc03225403d3e3b00e93b3060ec1c3d1c.tar.gz
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
Diffstat (limited to 'qpid/cpp/lib/broker/BrokerMessage.cpp')
-rw-r--r--qpid/cpp/lib/broker/BrokerMessage.cpp1
1 files changed, 1 insertions, 0 deletions
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) {