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
qpid::framing::NotAllowedException::NotAllowedException
NotAllowedException(const std::string &msg=std::string())
Definition: reply_exceptions.h:99
qpid::framing::connection::CLOSE_CODE_FRAMING_ERROR
@ CLOSE_CODE_FRAMING_ERROR
Definition: enum.h:51
enum.h
qpid::framing::ConnectionForcedException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:135
qpid::framing::IllegalStateException
Definition: reply_exceptions.h:74
qpid::framing::session::DETACH_CODE_NOT_ATTACHED
@ DETACH_CODE_NOT_ATTACHED
Definition: enum.h:63
qpid::framing::UnknownIdsException::UnknownIdsException
UnknownIdsException(const std::string &msg=std::string())
Definition: reply_exceptions.h:180
qpid::framing::InvalidPathException::InvalidPathException
InvalidPathException(const std::string &msg=std::string())
Definition: reply_exceptions.h:143
qpid::framing::IllegalArgumentException
Definition: reply_exceptions.h:102
qpid::framing::InvalidPathException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:142
qpid::framing::ResourceLockedException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:56
qpid::framing::ConnectionForcedException::ConnectionForcedException
ConnectionForcedException(const std::string &msg=std::string())
Definition: reply_exceptions.h:136
qpid::framing::UnauthorizedAccessException
Definition: reply_exceptions.h:39
qpid::framing::NotAttachedException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:172
qpid::framing::ResourceLimitExceededException
Definition: reply_exceptions.h:88
qpid::framing::execution::ERROR_CODE_PRECONDITION_FAILED
@ ERROR_CODE_PRECONDITION_FAILED
Definition: enum.h:76
qpid::framing::FramingErrorException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:149
qpid::framing::NotFoundException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:49
qpid::framing::ResourceDeletedException
Definition: reply_exceptions.h:67
qpid::framing::NotAttachedException
Definition: reply_exceptions.h:169
qpid::framing::NotFoundException::NotFoundException
NotFoundException(const std::string &msg=std::string())
Definition: reply_exceptions.h:50
qpid::framing::execution::ERROR_CODE_RESOURCE_DELETED
@ ERROR_CODE_RESOURCE_DELETED
Definition: enum.h:77
qpid::framing::UnauthorizedAccessException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:42
qpid::framing::ResourceLockedException
Definition: reply_exceptions.h:53
qpid::framing::ResourceDeletedException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:70
qpid::framing::SessionBusyException
Definition: reply_exceptions.h:155
qpid::framing::ResourceDeletedException::ResourceDeletedException
ResourceDeletedException(const std::string &msg=std::string())
Definition: reply_exceptions.h:71
qpid::framing::ConnectionForcedException
Definition: reply_exceptions.h:132
qpid::framing::execution::ERROR_CODE_NOT_IMPLEMENTED
@ ERROR_CODE_NOT_IMPLEMENTED
Definition: enum.h:83
qpid::framing::connection::CLOSE_CODE_CONNECTION_FORCED
@ CLOSE_CODE_CONNECTION_FORCED
Definition: enum.h:49
qpid::framing::createSessionException
sys::ExceptionHolder createSessionException(int code, const std::string &text)
qpid::framing::execution::ERROR_CODE_ILLEGAL_ARGUMENT
@ ERROR_CODE_ILLEGAL_ARGUMENT
Definition: enum.h:82
qpid::framing::TransportBusyException::TransportBusyException
TransportBusyException(const std::string &msg=std::string())
Definition: reply_exceptions.h:166
qpid::framing::UnknownIdsException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:179
qpid::framing::InternalErrorException
Definition: reply_exceptions.h:116
qpid::framing::execution::ERROR_CODE_NOT_ALLOWED
@ ERROR_CODE_NOT_ALLOWED
Definition: enum.h:81
qpid::framing::IllegalStateException::IllegalStateException
IllegalStateException(const std::string &msg=std::string())
Definition: reply_exceptions.h:78
qpid::framing::execution::ERROR_CODE_NOT_FOUND
@ ERROR_CODE_NOT_FOUND
Definition: enum.h:74
qpid::framing::FramingErrorException::FramingErrorException
FramingErrorException(const std::string &msg=std::string())
Definition: reply_exceptions.h:150
qpid::framing::InternalErrorException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:119
qpid
This file was automatically generated from the AMQP specification.
Definition: arg.h:33
qpid::framing::SessionBusyException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:158
qpid::framing::ResourceLimitExceededException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:91
qpid::framing::createConnectionException
sys::ExceptionHolder createConnectionException(int code, const std::string &text)
qpid::framing::IllegalStateException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:77
qpid::framing::execution::ERROR_CODE_UNAUTHORIZED_ACCESS
@ ERROR_CODE_UNAUTHORIZED_ACCESS
Definition: enum.h:73
qpid::framing::execution::ERROR_CODE_ILLEGAL_STATE
@ ERROR_CODE_ILLEGAL_STATE
Definition: enum.h:78
qpid::framing::InternalErrorException::InternalErrorException
InternalErrorException(const std::string &msg=std::string())
Definition: reply_exceptions.h:120
qpid::framing::FramingErrorException
Definition: reply_exceptions.h:146
qpid::framing::PreconditionFailedException::PreconditionFailedException
PreconditionFailedException(const std::string &msg=std::string())
Definition: reply_exceptions.h:64
qpid::framing::InvalidArgumentException::InvalidArgumentException
InvalidArgumentException(const std::string &msg=std::string())
Definition: reply_exceptions.h:127
qpid::framing::execution::ERROR_CODE_RESOURCE_LOCKED
@ ERROR_CODE_RESOURCE_LOCKED
Definition: enum.h:75
qpid::framing::UnknownIdsException
Definition: reply_exceptions.h:176
qpid::framing::createChannelException
sys::ExceptionHolder createChannelException(int code, const std::string &text)
qpid::framing::NotImplementedException::NotImplementedException
NotImplementedException(const std::string &msg=std::string())
Definition: reply_exceptions.h:113
qpid::framing::PreconditionFailedException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:63
qpid::framing::IllegalArgumentException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:105
qpid::framing::NotAllowedException
Definition: reply_exceptions.h:95
qpid::framing::TransportBusyException
Definition: reply_exceptions.h:162
qpid::framing::ResourceLockedException::ResourceLockedException
ResourceLockedException(const std::string &msg=std::string())
Definition: reply_exceptions.h:57
qpid::framing::InvalidPathException
Definition: reply_exceptions.h:139
qpid::framing::execution::ERROR_CODE_COMMAND_INVALID
@ ERROR_CODE_COMMAND_INVALID
Definition: enum.h:79
qpid::framing::execution::ERROR_CODE_RESOURCE_LIMIT_EXCEEDED
@ ERROR_CODE_RESOURCE_LIMIT_EXCEEDED
Definition: enum.h:80
qpid::framing::CommandInvalidException::CommandInvalidException
CommandInvalidException(const std::string &msg=std::string())
Definition: reply_exceptions.h:85
qpid::framing::NotImplementedException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:112
qpid::framing::CommandInvalidException
Definition: reply_exceptions.h:81
qpid::framing::NotAttachedException::NotAttachedException
NotAttachedException(const std::string &msg=std::string())
Definition: reply_exceptions.h:173
qpid::framing::PreconditionFailedException
Definition: reply_exceptions.h:60
qpid::framing::InvalidArgumentException
Definition: reply_exceptions.h:123
qpid::framing::session::DETACH_CODE_SESSION_BUSY
@ DETACH_CODE_SESSION_BUSY
Definition: enum.h:61
qpid::framing::UnauthorizedAccessException::UnauthorizedAccessException
UnauthorizedAccessException(const std::string &msg=std::string())
Definition: reply_exceptions.h:43
qpid::framing::CommandInvalidException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:84
qpid::framing::InvalidArgumentException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:126
qpid::framing::NotFoundException
Definition: reply_exceptions.h:46
qpid::framing::NotAllowedException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:98
qpid::framing::IllegalArgumentException::IllegalArgumentException
IllegalArgumentException(const std::string &msg=std::string())
Definition: reply_exceptions.h:106
qpid::framing::session::DETACH_CODE_TRANSPORT_BUSY
@ DETACH_CODE_TRANSPORT_BUSY
Definition: enum.h:62
qpid::framing::connection::CLOSE_CODE_INVALID_PATH
@ CLOSE_CODE_INVALID_PATH
Definition: enum.h:50
qpid::framing::execution::ERROR_CODE_INTERNAL_ERROR
@ ERROR_CODE_INTERNAL_ERROR
Definition: enum.h:84
qpid::framing::execution::ERROR_CODE_INVALID_ARGUMENT
@ ERROR_CODE_INVALID_ARGUMENT
Definition: enum.h:85
qpid::framing::SessionBusyException::SessionBusyException
SessionBusyException(const std::string &msg=std::string())
Definition: reply_exceptions.h:159
qpid::framing::session::DETACH_CODE_UNKNOWN_IDS
@ DETACH_CODE_UNKNOWN_IDS
Definition: enum.h:64
qpid::framing::TransportBusyException::getPrefix
std::string getPrefix() const
Definition: reply_exceptions.h:165
qpid::framing::NotImplementedException
Definition: reply_exceptions.h:109
qpid::framing::ResourceLimitExceededException::ResourceLimitExceededException
ResourceLimitExceededException(const std::string &msg=std::string())
Definition: reply_exceptions.h:92

Qpid C++ API Reference
Generated on Fri Nov 4 2022 for Qpid C++ Client API by doxygen 1.8.17