diff options
Diffstat (limited to 'cpp/src/qpid/framing/Uuid.cpp')
-rw-r--r-- | cpp/src/qpid/framing/Uuid.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cpp/src/qpid/framing/Uuid.cpp b/cpp/src/qpid/framing/Uuid.cpp index 3a83430d56..2918c48ce3 100644 --- a/cpp/src/qpid/framing/Uuid.cpp +++ b/cpp/src/qpid/framing/Uuid.cpp @@ -17,9 +17,9 @@ */ #include "Uuid.h" - -#include "qpid/QpidError.h" +#include "qpid/Exception.h" #include "qpid/framing/Buffer.h" +#include "qpid/framing/reply_exceptions.h" namespace qpid { namespace framing { @@ -34,7 +34,7 @@ void Uuid::encode(Buffer& buf) const { void Uuid::decode(Buffer& buf) { if (buf.available() < size()) - THROW_QPID_ERROR(FRAMING_ERROR, "Not enough data for UUID."); + throw SyntaxErrorException(QPID_MSG("Not enough data for UUID.")); buf.getRawData(c_array(), size()); } @@ -52,4 +52,10 @@ istream& operator>>(istream& in, Uuid& uuid) { return in; } +std::string Uuid::str() const { + std::ostringstream os; + os << *this; + return os.str(); +} + }} // namespace qpid::framing |