summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-04-03 19:57:14 +0000
committerAlan Conway <aconway@apache.org>2008-04-03 19:57:14 +0000
commit39c9c45c38d82914324cbdf4c89d5ad92d9f8e6d (patch)
tree455066312c0fa8235fca6cf9e99f5f1c7462e495 /cpp/src
parent9fb7885893067b5924aac26502433cec7212d6c7 (diff)
downloadqpid-python-39c9c45c38d82914324cbdf4c89d5ad92d9f8e6d.tar.gz
rubygen/0-10/exceptions.rb:
- generate exception classes for each error code, e.g. InvalidArgumentException rubygen/0-10/specification.rb - extracted specification_fwd.h from specification.h, contains consts enums, typedefs and forward declarations of classes. src/qpid/amqp_0_10/Map.cpp, src/qpid/broker/SessionAdapter.cpp: - updated to use exceptions.h git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@644461 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/amqp_0_10/Map.cpp4
-rw-r--r--cpp/src/qpid/broker/SessionAdapter.cpp5
2 files changed, 5 insertions, 4 deletions
diff --git a/cpp/src/qpid/amqp_0_10/Map.cpp b/cpp/src/qpid/amqp_0_10/Map.cpp
index 480b439e40..eecd3eed7d 100644
--- a/cpp/src/qpid/amqp_0_10/Map.cpp
+++ b/cpp/src/qpid/amqp_0_10/Map.cpp
@@ -18,7 +18,7 @@
* under the License.
*
*/
-#include "qpid/amqp_0_10/specification.h" // for error constants.
+#include "qpid/amqp_0_10/exceptions.h"
#include "Map.h"
#include <ostream>
@@ -63,7 +63,7 @@ uint32_t Map::contentSize() const {
}
void Map::throwInvalidArg() {
- throw SessionException(execution::INVALID_ARGUMENT, "Invalid map encoding");
+ throw InvalidArgumentException("Invalid map encoding");
}
}} // namespace qpid::amqp_0_10
diff --git a/cpp/src/qpid/broker/SessionAdapter.cpp b/cpp/src/qpid/broker/SessionAdapter.cpp
index 3daf15f269..497f381807 100644
--- a/cpp/src/qpid/broker/SessionAdapter.cpp
+++ b/cpp/src/qpid/broker/SessionAdapter.cpp
@@ -24,6 +24,7 @@
#include "qpid/framing/reply_exceptions.h"
#include "qpid/framing/constants.h"
#include "qpid/log/Statement.h"
+#include "qpid/amqp_0_10/exceptions.h"
#include <boost/format.hpp>
#include <boost/cast.hpp>
#include <boost/bind.hpp>
@@ -574,11 +575,11 @@ void SessionAdapter::DtxHandlerImpl::setTimeout(const Xid010& xid,
Queue::shared_ptr SessionAdapter::HandlerHelper::getQueue(const string& name) const {
Queue::shared_ptr queue;
if (name.empty()) {
- throw SessionException(531, QPID_MSG("No queue name specified."));
+ throw amqp_0_10::IllegalArgumentException(QPID_MSG("No queue name specified."));
} else {
queue = session.getBroker().getQueues().find(name);
if (!queue)
- throw NotFoundException(QPID_MSG("Queue not found: "<<name));
+ throw amqp_0_10::NotFoundException(QPID_MSG("Queue not found: "<<name));
}
return queue;
}