summaryrefslogtreecommitdiff
path: root/cpp/lib/common/framing/ProtocolVersionException.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/lib/common/framing/ProtocolVersionException.cpp')
-rw-r--r--cpp/lib/common/framing/ProtocolVersionException.cpp45
1 files changed, 6 insertions, 39 deletions
diff --git a/cpp/lib/common/framing/ProtocolVersionException.cpp b/cpp/lib/common/framing/ProtocolVersionException.cpp
index 8249a88f4b..9088422f6f 100644
--- a/cpp/lib/common/framing/ProtocolVersionException.cpp
+++ b/cpp/lib/common/framing/ProtocolVersionException.cpp
@@ -18,49 +18,16 @@
* under the License.
*
*/
+#include <boost/format.hpp>
#include <ProtocolVersionException.h>
-#include <sstream>
-using namespace qpid::framing;
-
-ProtocolVersionException::ProtocolVersionException() throw ()
-{
-}
-
-ProtocolVersionException::ProtocolVersionException(const std::string& str) throw () : Exception(str)
-{
-}
-
-ProtocolVersionException::ProtocolVersionException(const char* str) throw () : Exception(str)
-{
-}
-
-ProtocolVersionException::ProtocolVersionException(const ProtocolVersion& versionFound_, const std::string& str) throw () : Exception(str)
-{
- versionFound = versionFound_;
-}
-
-ProtocolVersionException::ProtocolVersionException(const ProtocolVersion& versionFound_, const char* str) throw () : Exception(str)
-
-{
- versionFound = versionFound_;
-}
-
-ProtocolVersionException::~ProtocolVersionException() throw ()
-{
-}
+using namespace qpid::framing;
-const char* ProtocolVersionException::what() const throw()
+void ProtocolVersionException::init(const std::string& msg)
{
- std::stringstream ss;
- ss << "ProtocolVersionException: AMQP Version " << versionFound.toString() << " found: " << whatStr;
- return ss.str().c_str();
+ whatStr = boost::str(
+ boost::format("ProtocolVersionException: %s found: %s")
+ % versionFound.toString() % msg);
}
-std::string ProtocolVersionException::toString() const throw()
-{
- std::stringstream ss;
- ss << "ProtocolVersionException: AMQP Version " << versionFound.toString() << " found: " << whatStr;
- return ss.str();
-}