Qpid C++ Messaging API  0.22
qpid/messaging/exceptions.h
Go to the documentation of this file.
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     qpid::types::Variant::Map detail;
00045     //TODO: override what() to include detail if present
00046 };
00047 
00052 struct QPID_MESSAGING_CLASS_EXTERN InvalidOptionString : public MessagingException
00053 {
00054     QPID_MESSAGING_EXTERN InvalidOptionString(const std::string& msg);
00055 };
00056 
00062 struct QPID_MESSAGING_CLASS_EXTERN KeyError : public MessagingException
00063 {
00064     QPID_MESSAGING_EXTERN KeyError(const std::string&);
00065 };
00066 
00067 struct QPID_MESSAGING_CLASS_EXTERN LinkError : public MessagingException
00068 {
00069     QPID_MESSAGING_EXTERN LinkError(const std::string&);
00070 };
00071 
00072 struct QPID_MESSAGING_CLASS_EXTERN AddressError : public LinkError
00073 {
00074     QPID_MESSAGING_EXTERN AddressError(const std::string&);
00075 };
00076 
00081 struct QPID_MESSAGING_CLASS_EXTERN ResolutionError : public AddressError
00082 {
00083     QPID_MESSAGING_EXTERN ResolutionError(const std::string& msg);
00084 };
00085 
00090 struct QPID_MESSAGING_CLASS_EXTERN AssertionFailed : public ResolutionError
00091 {
00092     QPID_MESSAGING_EXTERN AssertionFailed(const std::string& msg);
00093 };
00094 
00099 struct QPID_MESSAGING_CLASS_EXTERN NotFound : public ResolutionError
00100 {
00101     QPID_MESSAGING_EXTERN NotFound(const std::string& msg);
00102 };
00103 
00107 struct QPID_MESSAGING_CLASS_EXTERN MalformedAddress : public AddressError
00108 {
00109     QPID_MESSAGING_EXTERN MalformedAddress(const std::string& msg);
00110 };
00111 
00112 struct QPID_MESSAGING_CLASS_EXTERN ReceiverError : public LinkError
00113 {
00114     QPID_MESSAGING_EXTERN ReceiverError(const std::string&);
00115 };
00116 
00117 struct QPID_MESSAGING_CLASS_EXTERN FetchError : public ReceiverError
00118 {
00119     QPID_MESSAGING_EXTERN FetchError(const std::string&);
00120 };
00121 
00127 struct QPID_MESSAGING_CLASS_EXTERN NoMessageAvailable : public FetchError
00128 {
00129     QPID_MESSAGING_EXTERN NoMessageAvailable();
00130 };
00131 
00132 struct QPID_MESSAGING_CLASS_EXTERN SenderError : public LinkError
00133 {
00134     QPID_MESSAGING_EXTERN SenderError(const std::string&);
00135 };
00136 
00137 struct QPID_MESSAGING_CLASS_EXTERN SendError : public SenderError
00138 {
00139     QPID_MESSAGING_EXTERN SendError(const std::string&);
00140 };
00141 
00147 struct QPID_MESSAGING_CLASS_EXTERN TargetCapacityExceeded : public SendError
00148 {
00149     QPID_MESSAGING_EXTERN TargetCapacityExceeded(const std::string&);
00150 };
00151 
00152 struct QPID_MESSAGING_CLASS_EXTERN SessionError : public MessagingException
00153 {
00154     QPID_MESSAGING_EXTERN SessionError(const std::string&);
00155 };
00156 
00157 struct QPID_MESSAGING_CLASS_EXTERN TransactionError : public SessionError
00158 {
00159     QPID_MESSAGING_EXTERN TransactionError(const std::string&);
00160 };
00161 
00166 struct QPID_MESSAGING_CLASS_EXTERN TransactionAborted : public TransactionError
00167 {
00168     QPID_MESSAGING_EXTERN TransactionAborted(const std::string&);
00169 };
00170 
00175 struct QPID_MESSAGING_CLASS_EXTERN UnauthorizedAccess : public SessionError
00176 {
00177     QPID_MESSAGING_EXTERN UnauthorizedAccess(const std::string&);
00178 };
00179 
00180 struct QPID_MESSAGING_CLASS_EXTERN ConnectionError : public MessagingException
00181 {
00182     QPID_MESSAGING_EXTERN ConnectionError(const std::string&);
00183 };
00184 
00192 struct QPID_MESSAGING_CLASS_EXTERN TransportFailure : public MessagingException
00193 {
00194     QPID_MESSAGING_EXTERN TransportFailure(const std::string&);
00195 };
00196 
00197 }} // namespace qpid::messaging
00198 
00199 #endif