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"
31 #include "qpid/sys/ExceptionHolder.h"
32 #include "qpid/framing/enum.h"
33 #include "qpid/CommonImportExport.h"
34 
35 namespace qpid {
36 namespace framing {
37 
38 
40  SessionException
41 {
42  std::string getPrefix() const { return "unauthorized-access"; }
43  UnauthorizedAccessException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_UNAUTHORIZED_ACCESS, ""+msg) {}
44 };
45 
47  SessionException
48 {
49  std::string getPrefix() const { return "not-found"; }
50  NotFoundException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_NOT_FOUND, ""+msg) {}
51 };
52 
54  SessionException
55 {
56  std::string getPrefix() const { return "resource-locked"; }
57  ResourceLockedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_RESOURCE_LOCKED, ""+msg) {}
58 };
59 
61  SessionException
62 {
63  std::string getPrefix() const { return "precondition-failed"; }
64  PreconditionFailedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_PRECONDITION_FAILED, ""+msg) {}
65 };
66 
68  SessionException
69 {
70  std::string getPrefix() const { return "resource-deleted"; }
71  ResourceDeletedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_RESOURCE_DELETED, ""+msg) {}
72 };
73 
75  SessionException
76 {
77  std::string getPrefix() const { return "illegal-state"; }
78  IllegalStateException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_ILLEGAL_STATE, ""+msg) {}
79 };
80 
82  SessionException
83 {
84  std::string getPrefix() const { return "command-invalid"; }
85  CommandInvalidException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_COMMAND_INVALID, ""+msg) {}
86 };
87 
89  SessionException
90 {
91  std::string getPrefix() const { return "resource-limit-exceeded"; }
92  ResourceLimitExceededException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_RESOURCE_LIMIT_EXCEEDED, ""+msg) {}
93 };
94 
96  SessionException
97 {
98  std::string getPrefix() const { return "not-allowed"; }
99  NotAllowedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_NOT_ALLOWED, ""+msg) {}
100 };
101 
103  SessionException
104 {
105  std::string getPrefix() const { return "illegal-argument"; }
106  IllegalArgumentException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_ILLEGAL_ARGUMENT, ""+msg) {}
107 };
108 
110  SessionException
111 {
112  std::string getPrefix() const { return "not-implemented"; }
113  NotImplementedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_NOT_IMPLEMENTED, ""+msg) {}
114 };
115 
117  SessionException
118 {
119  std::string getPrefix() const { return "internal-error"; }
120  InternalErrorException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_INTERNAL_ERROR, ""+msg) {}
121 };
122 
124  SessionException
125 {
126  std::string getPrefix() const { return "invalid-argument"; }
127  InvalidArgumentException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_INVALID_ARGUMENT, ""+msg) {}
128 };
129 
130 QPID_COMMON_EXTERN sys::ExceptionHolder createSessionException(int code, const std::string& text);
131 
133  ConnectionException
134 {
135  std::string getPrefix() const { return "connection-forced"; }
136  ConnectionForcedException(const std::string& msg=std::string()) : ConnectionException(connection::CLOSE_CODE_CONNECTION_FORCED, ""+msg) {}
137 };
138 
140  ConnectionException
141 {
142  std::string getPrefix() const { return "invalid-path"; }
143  InvalidPathException(const std::string& msg=std::string()) : ConnectionException(connection::CLOSE_CODE_INVALID_PATH, ""+msg) {}
144 };
145 
147  ConnectionException
148 {
149  std::string getPrefix() const { return "framing-error"; }
150  FramingErrorException(const std::string& msg=std::string()) : ConnectionException(connection::CLOSE_CODE_FRAMING_ERROR, ""+msg) {}
151 };
152 
153 QPID_COMMON_EXTERN sys::ExceptionHolder createConnectionException(int code, const std::string& text);
154 
156  ChannelException
157 {
158  std::string getPrefix() const { return "session-busy"; }
159  SessionBusyException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_SESSION_BUSY, ""+msg) {}
160 };
161 
163  ChannelException
164 {
165  std::string getPrefix() const { return "transport-busy"; }
166  TransportBusyException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_TRANSPORT_BUSY, ""+msg) {}
167 };
168 
170  ChannelException
171 {
172  std::string getPrefix() const { return "not-attached"; }
173  NotAttachedException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_NOT_ATTACHED, ""+msg) {}
174 };
175 
177  ChannelException
178 {
179  std::string getPrefix() const { return "unknown-ids"; }
180  UnknownIdsException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_UNKNOWN_IDS, ""+msg) {}
181 };
182 
183 QPID_COMMON_EXTERN sys::ExceptionHolder createChannelException(int code, const std::string& text);
184 
185 }} // namespace qpid::framing
186 
187 #endif
ConnectionForcedException(const std::string &msg=std::string())
sys::ExceptionHolder createConnectionException(int code, const std::string &text)
FramingErrorException(const std::string &msg=std::string())
sys::ExceptionHolder createChannelException(int code, const std::string &text)
PreconditionFailedException(const std::string &msg=std::string())
ResourceDeletedException(const std::string &msg=std::string())
InternalErrorException(const std::string &msg=std::string())
IllegalArgumentException(const std::string &msg=std::string())
CommandInvalidException(const std::string &msg=std::string())
InvalidArgumentException(const std::string &msg=std::string())
NotAllowedException(const std::string &msg=std::string())
UnknownIdsException(const std::string &msg=std::string())
sys::ExceptionHolder createSessionException(int code, const std::string &text)
NotAttachedException(const std::string &msg=std::string())
NotFoundException(const std::string &msg=std::string())
ResourceLimitExceededException(const std::string &msg=std::string())
NotImplementedException(const std::string &msg=std::string())
SessionBusyException(const std::string &msg=std::string())
IllegalStateException(const std::string &msg=std::string())
ResourceLockedException(const std::string &msg=std::string())
UnauthorizedAccessException(const std::string &msg=std::string())
TransportBusyException(const std::string &msg=std::string())
InvalidPathException(const std::string &msg=std::string())

Qpid C++ API Reference
Generated on Tue Oct 28 2014 for Qpid C++ Client API by doxygen 1.8.5