Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
00001 #ifndef QPID_MESSAGING_EXCEPTIONS_H 00002 #define QPID_MESSAGING_EXCEPTIONS_H 00003 00004 /* 00005 * 00006 * Licensed to the Apache Software Foundation (ASF) under one 00007 * or more contributor license agreements. See the NOTICE file 00008 * distributed with this work for additional information 00009 * regarding copyright ownership. The ASF licenses this file 00010 * to you under the Apache License, Version 2.0 (the 00011 * "License"); you may not use this file except in compliance 00012 * with the License. You may obtain a copy of the License at 00013 * 00014 * http://www.apache.org/licenses/LICENSE-2.0 00015 * 00016 * Unless required by applicable law or agreed to in writing, 00017 * software distributed under the License is distributed on an 00018 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 00019 * KIND, either express or implied. See the License for the 00020 * specific language governing permissions and limitations 00021 * under the License. 00022 * 00023 */ 00024 00025 #include "qpid/messaging/ImportExport.h" 00026 #include "qpid/types/Exception.h" 00027 #include "qpid/types/Variant.h" 00028 00029 namespace qpid { 00030 namespace messaging { 00031 00039 struct QPID_MESSAGING_CLASS_EXTERN MessagingException : public qpid::types::Exception 00040 { 00041 QPID_MESSAGING_EXTERN MessagingException(const std::string& msg); 00042 QPID_MESSAGING_EXTERN virtual ~MessagingException() throw(); 00043 }; 00044 00049 struct QPID_MESSAGING_CLASS_EXTERN InvalidOptionString : public MessagingException 00050 { 00051 QPID_MESSAGING_EXTERN InvalidOptionString(const std::string& msg); 00052 }; 00053 00059 struct QPID_MESSAGING_CLASS_EXTERN KeyError : public MessagingException 00060 { 00061 QPID_MESSAGING_EXTERN KeyError(const std::string&); 00062 }; 00063 00064 struct QPID_MESSAGING_CLASS_EXTERN LinkError : public MessagingException 00065 { 00066 QPID_MESSAGING_EXTERN LinkError(const std::string&); 00067 }; 00068 00069 struct QPID_MESSAGING_CLASS_EXTERN AddressError : public LinkError 00070 { 00071 QPID_MESSAGING_EXTERN AddressError(const std::string&); 00072 }; 00073 00078 struct QPID_MESSAGING_CLASS_EXTERN ResolutionError : public AddressError 00079 { 00080 QPID_MESSAGING_EXTERN ResolutionError(const std::string& msg); 00081 }; 00082 00087 struct QPID_MESSAGING_CLASS_EXTERN AssertionFailed : public ResolutionError 00088 { 00089 QPID_MESSAGING_EXTERN AssertionFailed(const std::string& msg); 00090 }; 00091 00096 struct QPID_MESSAGING_CLASS_EXTERN NotFound : public ResolutionError 00097 { 00098 QPID_MESSAGING_EXTERN NotFound(const std::string& msg); 00099 }; 00100 00104 struct QPID_MESSAGING_CLASS_EXTERN MalformedAddress : public AddressError 00105 { 00106 QPID_MESSAGING_EXTERN MalformedAddress(const std::string& msg); 00107 }; 00108 00109 struct QPID_MESSAGING_CLASS_EXTERN ReceiverError : public LinkError 00110 { 00111 QPID_MESSAGING_EXTERN ReceiverError(const std::string&); 00112 }; 00113 00114 struct QPID_MESSAGING_CLASS_EXTERN FetchError : public ReceiverError 00115 { 00116 QPID_MESSAGING_EXTERN FetchError(const std::string&); 00117 }; 00118 00124 struct QPID_MESSAGING_CLASS_EXTERN NoMessageAvailable : public FetchError 00125 { 00126 QPID_MESSAGING_EXTERN NoMessageAvailable(); 00127 }; 00128 00129 struct QPID_MESSAGING_CLASS_EXTERN SenderError : public LinkError 00130 { 00131 QPID_MESSAGING_EXTERN SenderError(const std::string&); 00132 }; 00133 00134 struct QPID_MESSAGING_CLASS_EXTERN SendError : public SenderError 00135 { 00136 QPID_MESSAGING_EXTERN SendError(const std::string&); 00137 }; 00138 00144 struct QPID_MESSAGING_CLASS_EXTERN TargetCapacityExceeded : public SendError 00145 { 00146 QPID_MESSAGING_EXTERN TargetCapacityExceeded(const std::string&); 00147 }; 00148 00149 struct QPID_MESSAGING_CLASS_EXTERN SessionError : public MessagingException 00150 { 00151 QPID_MESSAGING_EXTERN SessionError(const std::string&); 00152 }; 00153 00154 struct QPID_MESSAGING_CLASS_EXTERN TransactionError : public SessionError 00155 { 00156 QPID_MESSAGING_EXTERN TransactionError(const std::string&); 00157 }; 00158 00163 struct QPID_MESSAGING_CLASS_EXTERN TransactionAborted : public TransactionError 00164 { 00165 QPID_MESSAGING_EXTERN TransactionAborted(const std::string&); 00166 }; 00167 00172 struct QPID_MESSAGING_CLASS_EXTERN UnauthorizedAccess : public SessionError 00173 { 00174 QPID_MESSAGING_EXTERN UnauthorizedAccess(const std::string&); 00175 }; 00176 00177 struct QPID_MESSAGING_CLASS_EXTERN ConnectionError : public MessagingException 00178 { 00179 QPID_MESSAGING_EXTERN ConnectionError(const std::string&); 00180 }; 00181 00189 struct QPID_MESSAGING_CLASS_EXTERN TransportFailure : public MessagingException 00190 { 00191 QPID_MESSAGING_EXTERN TransportFailure(const std::string&); 00192 }; 00193 00194 }} // namespace qpid::messaging 00195 00196 #endif