Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
reply_exceptions.h
Go to the documentation of this file.
1 #ifndef QPID_FRAMING_REPLY_EXCEPTIONS_H
2 #define QPID_FRAMING_REPLY_EXCEPTIONS_H
3 /*
4  *
5  * Licensed to the Apache Software Foundation (ASF) under one
6  * or more contributor license agreements. See the NOTICE file
7  * distributed with this work for additional information
8  * regarding copyright ownership. The ASF licenses this file
9  * to you under the Apache License, Version 2.0 (the
10  * "License"); you may not use this file except in compliance
11  * with the License. You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing,
16  * software distributed under the License is distributed on an
17  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18  * KIND, either express or implied. See the License for the
19  * specific language governing permissions and limitations
20  * under the License.
21  *
22  */
23 
28 
29 
30 #include "qpid/Exception.h"
32 #include "qpid/framing/enum.h"
34 
35 namespace qpid {
36 namespace framing {
37 
38 
47 {
48  std::string getPrefix() const { return "unauthorized-access"; }
49  UnauthorizedAccessException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_UNAUTHORIZED_ACCESS, ""+msg) {}
50 };
51 
59 {
60  std::string getPrefix() const { return "not-found"; }
61  NotFoundException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_NOT_FOUND, ""+msg) {}
62 };
63 
72 {
73  std::string getPrefix() const { return "resource-locked"; }
74  ResourceLockedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_RESOURCE_LOCKED, ""+msg) {}
75 };
76 
84 {
85  std::string getPrefix() const { return "precondition-failed"; }
86  PreconditionFailedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_PRECONDITION_FAILED, ""+msg) {}
87 };
88 
96 {
97  std::string getPrefix() const { return "resource-deleted"; }
98  ResourceDeletedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_RESOURCE_DELETED, ""+msg) {}
99 };
100 
108 {
109  std::string getPrefix() const { return "illegal-state"; }
110  IllegalStateException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_ILLEGAL_STATE, ""+msg) {}
111 };
112 
120 {
121  std::string getPrefix() const { return "command-invalid"; }
122  CommandInvalidException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_COMMAND_INVALID, ""+msg) {}
123 };
124 
132 {
133  std::string getPrefix() const { return "resource-limit-exceeded"; }
134  ResourceLimitExceededException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_RESOURCE_LIMIT_EXCEEDED, ""+msg) {}
135 };
136 
145 {
146  std::string getPrefix() const { return "not-allowed"; }
147  NotAllowedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_NOT_ALLOWED, ""+msg) {}
148 };
149 
159 {
160  std::string getPrefix() const { return "illegal-argument"; }
161  IllegalArgumentException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_ILLEGAL_ARGUMENT, ""+msg) {}
162 };
163 
171 {
172  std::string getPrefix() const { return "not-implemented"; }
173  NotImplementedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_NOT_IMPLEMENTED, ""+msg) {}
174 };
175 
184 {
185  std::string getPrefix() const { return "internal-error"; }
186  InternalErrorException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_INTERNAL_ERROR, ""+msg) {}
187 };
188 
198 {
199  std::string getPrefix() const { return "invalid-argument"; }
200  InvalidArgumentException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_INVALID_ARGUMENT, ""+msg) {}
201 };
202 
203 QPID_COMMON_EXTERN sys::ExceptionHolder createSessionException(int code, const std::string& text);
204 
213 {
214  std::string getPrefix() const { return "connection-forced"; }
215  ConnectionForcedException(const std::string& msg=std::string()) : ConnectionException(connection::CLOSE_CODE_CONNECTION_FORCED, ""+msg) {}
216 };
217 
225 {
226  std::string getPrefix() const { return "invalid-path"; }
227  InvalidPathException(const std::string& msg=std::string()) : ConnectionException(connection::CLOSE_CODE_INVALID_PATH, ""+msg) {}
228 };
229 
237 {
238  std::string getPrefix() const { return "framing-error"; }
239  FramingErrorException(const std::string& msg=std::string()) : ConnectionException(connection::CLOSE_CODE_FRAMING_ERROR, ""+msg) {}
240 };
241 
242 QPID_COMMON_EXTERN sys::ExceptionHolder createConnectionException(int code, const std::string& text);
243 
251 {
252  std::string getPrefix() const { return "session-busy"; }
253  SessionBusyException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_SESSION_BUSY, ""+msg) {}
254 };
255 
263 {
264  std::string getPrefix() const { return "transport-busy"; }
265  TransportBusyException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_TRANSPORT_BUSY, ""+msg) {}
266 };
267 
275 {
276  std::string getPrefix() const { return "not-attached"; }
277  NotAttachedException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_NOT_ATTACHED, ""+msg) {}
278 };
279 
287 {
288  std::string getPrefix() const { return "unknown-ids"; }
289  UnknownIdsException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_UNKNOWN_IDS, ""+msg) {}
290 };
291 
292 QPID_COMMON_EXTERN sys::ExceptionHolder createChannelException(int code, const std::string& text);
293 
294 }} // namespace qpid::framing
295 
296 #endif

Qpid C++ API Reference
Generated on Tue Mar 5 2013 for Qpid C++ Client API by doxygen 1.8.1.1