summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/framing/Array.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-04-24 21:07:34 +0000
committerGordon Sim <gsim@apache.org>2008-04-24 21:07:34 +0000
commit1c86294add5cbb640aac7f458c4de693de48dd9f (patch)
tree22d7774e00c7514c4b76be5cf8b50727b74fe4e3 /cpp/src/qpid/framing/Array.cpp
parent96f12949244b5af2b717156823309b66fe7bfb84 (diff)
downloadqpid-python-1c86294add5cbb640aac7f458c4de693de48dd9f.tar.gz
Generate c++ code from final 0-10 spec
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@651423 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/framing/Array.cpp')
-rw-r--r--cpp/src/qpid/framing/Array.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/qpid/framing/Array.cpp b/cpp/src/qpid/framing/Array.cpp
index 71281c7a52..f0b6331ff3 100644
--- a/cpp/src/qpid/framing/Array.cpp
+++ b/cpp/src/qpid/framing/Array.cpp
@@ -77,7 +77,7 @@ void Array::decode(Buffer& buffer){
uint32_t size = buffer.getLong();//size added only when array is a top-level type
uint32_t available = buffer.available();
if (available < size) {
- throw SyntaxErrorException(QPID_MSG("Not enough data for array, expected "
+ throw IllegalArgumentException(QPID_MSG("Not enough data for array, expected "
<< size << " bytes but only " << available << " available"));
}
if (size) {
@@ -88,7 +88,7 @@ void Array::decode(Buffer& buffer){
dummy.setType(typeOctet);
available = buffer.available();
if (available < count * dummy.getData().size()) {
- throw SyntaxErrorException(QPID_MSG("Not enough data for array, expected "
+ throw IllegalArgumentException(QPID_MSG("Not enough data for array, expected "
<< count << " items of " << dummy.getData().size()
<< " bytes each but only " << available << " bytes available"));
}
@@ -117,7 +117,7 @@ bool Array::operator==(const Array& x) const {
void Array::add(ValuePtr value)
{
if (typeOctet != value->getType()) {
- throw SyntaxErrorException(QPID_MSG("Wrong type of value, expected " << typeOctet));
+ throw IllegalArgumentException(QPID_MSG("Wrong type of value, expected " << typeOctet));
}
values.push_back(value);
}