summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/framing/AMQFrame.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/AMQFrame.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/AMQFrame.cpp')
-rw-r--r--cpp/src/qpid/framing/AMQFrame.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/qpid/framing/AMQFrame.cpp b/cpp/src/qpid/framing/AMQFrame.cpp
index eeb658600d..3ebb61feb5 100644
--- a/cpp/src/qpid/framing/AMQFrame.cpp
+++ b/cpp/src/qpid/framing/AMQFrame.cpp
@@ -73,7 +73,7 @@ bool AMQFrame::decode(Buffer& buffer)
uint8_t flags = buffer.getOctet();
uint8_t framing_version = (flags & 0xc0) >> 6;
if (framing_version != 0)
- throw SyntaxErrorException(QPID_MSG("Framing version unsupported"));
+ throw FramingErrorException(QPID_MSG("Framing version unsupported"));
bof = flags & 0x08;
eof = flags & 0x04;
bos = flags & 0x02;
@@ -81,7 +81,7 @@ bool AMQFrame::decode(Buffer& buffer)
uint8_t type = buffer.getOctet();
uint16_t frame_size = buffer.getShort();
if (frame_size < frameOverhead()-1)
- throw SyntaxErrorException(QPID_MSG("Frame size too small"));
+ throw FramingErrorException(QPID_MSG("Frame size too small"));
uint8_t reserved1 = buffer.getOctet();
uint8_t field1 = buffer.getOctet();
subchannel = field1 & 0x0f;
@@ -92,7 +92,7 @@ bool AMQFrame::decode(Buffer& buffer)
// TODO: should we check reserved2 against zero as well? - the
// spec isn't clear
if ((flags & 0x30) != 0 || reserved1 != 0 || (field1 & 0xf0) != 0)
- throw SyntaxErrorException(QPID_MSG("Reserved bits not zero"));
+ throw FramingErrorException(QPID_MSG("Reserved bits not zero"));
// TODO: should no longer care about body size and only pass up
// B,E,b,e flags
@@ -105,7 +105,7 @@ bool AMQFrame::decode(Buffer& buffer)
body->decode(type,buffer, body_size);
uint8_t end = buffer.getOctet();
if (end != 0xCE)
- throw SyntaxErrorException(QPID_MSG("Frame end not found"));
+ throw FramingErrorException(QPID_MSG("Frame end not found"));
return true;
}