summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/Exception.h
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/Exception.h
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/Exception.h')
-rw-r--r--cpp/src/qpid/Exception.h24
1 files changed, 9 insertions, 15 deletions
diff --git a/cpp/src/qpid/Exception.h b/cpp/src/qpid/Exception.h
index 2f934166a7..e74fa79ed9 100644
--- a/cpp/src/qpid/Exception.h
+++ b/cpp/src/qpid/Exception.h
@@ -23,6 +23,7 @@
*/
#include "qpid/framing/amqp_types.h"
+#include "qpid/framing/constants.h"
#include "qpid/Msg.h"
#include <memory>
@@ -51,29 +52,22 @@ class Exception : public std::exception
mutable std::string whatStr;
};
-/**
- * I have made SessionException a common base for Channel- and
- * Connection- Exceptions. This is not strictly correct but allows all
- * model layer exceptions to be handled as SessionExceptions which is
- * how they are classified in the final 0-10 specification. I.e. this
- * is a temporary hack to allow the preview and final codepaths to
- * co-exist with minimal changes.
- */
-
struct SessionException : public Exception {
const framing::ReplyCode code;
SessionException(framing::ReplyCode code_, const std::string& message)
: Exception(message), code(code_) {}
};
-struct ChannelException : public SessionException {
- ChannelException(framing::ReplyCode code, const std::string& message)
- : SessionException(code, message) {}
+struct ChannelException : public Exception {
+ const framing::ReplyCode code;
+ ChannelException(framing::ReplyCode _code, const std::string& message)
+ : Exception(message), code(_code) {}
};
-struct ConnectionException : public SessionException {
- ConnectionException(framing::ReplyCode code, const std::string& message)
- : SessionException(code, message) {}
+struct ConnectionException : public Exception {
+ const framing::ReplyCode code;
+ ConnectionException(framing::ReplyCode _code, const std::string& message)
+ : Exception(message), code(_code) {}
};
struct ClosedException : public Exception {