Apache Qpid C++ API
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

gen/qpid/framing/reply_exceptions.h

Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_REPLY_EXCEPTIONS_H
00002 #define QPID_FRAMING_REPLY_EXCEPTIONS_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 #include "qpid/Exception.h"
00031 #include "qpid/sys/ExceptionHolder.h"
00032 #include "enum.h"
00033 
00034 namespace qpid {
00035 namespace framing {
00036 
00037 
00044 struct UnauthorizedAccessException:
00045     SessionException
00046 {
00047     std::string getPrefix() const { return "unauthorized-access"; }
00048     UnauthorizedAccessException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_UNAUTHORIZED_ACCESS, ""+msg) {}
00049 };
00050 
00056 struct NotFoundException:
00057     SessionException
00058 {
00059     std::string getPrefix() const { return "not-found"; }
00060     NotFoundException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_NOT_FOUND, ""+msg) {}
00061 };
00062 
00069 struct ResourceLockedException:
00070     SessionException
00071 {
00072     std::string getPrefix() const { return "resource-locked"; }
00073     ResourceLockedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_RESOURCE_LOCKED, ""+msg) {}
00074 };
00075 
00081 struct PreconditionFailedException:
00082     SessionException
00083 {
00084     std::string getPrefix() const { return "precondition-failed"; }
00085     PreconditionFailedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_PRECONDITION_FAILED, ""+msg) {}
00086 };
00087 
00093 struct ResourceDeletedException:
00094     SessionException
00095 {
00096     std::string getPrefix() const { return "resource-deleted"; }
00097     ResourceDeletedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_RESOURCE_DELETED, ""+msg) {}
00098 };
00099 
00105 struct IllegalStateException:
00106     SessionException
00107 {
00108     std::string getPrefix() const { return "illegal-state"; }
00109     IllegalStateException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_ILLEGAL_STATE, ""+msg) {}
00110 };
00111 
00117 struct CommandInvalidException:
00118     SessionException
00119 {
00120     std::string getPrefix() const { return "command-invalid"; }
00121     CommandInvalidException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_COMMAND_INVALID, ""+msg) {}
00122 };
00123 
00129 struct ResourceLimitExceededException:
00130     SessionException
00131 {
00132     std::string getPrefix() const { return "resource-limit-exceeded"; }
00133     ResourceLimitExceededException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_RESOURCE_LIMIT_EXCEEDED, ""+msg) {}
00134 };
00135 
00142 struct NotAllowedException:
00143     SessionException
00144 {
00145     std::string getPrefix() const { return "not-allowed"; }
00146     NotAllowedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_NOT_ALLOWED, ""+msg) {}
00147 };
00148 
00156 struct IllegalArgumentException:
00157     SessionException
00158 {
00159     std::string getPrefix() const { return "illegal-argument"; }
00160     IllegalArgumentException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_ILLEGAL_ARGUMENT, ""+msg) {}
00161 };
00162 
00168 struct NotImplementedException:
00169     SessionException
00170 {
00171     std::string getPrefix() const { return "not-implemented"; }
00172     NotImplementedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_NOT_IMPLEMENTED, ""+msg) {}
00173 };
00174 
00181 struct InternalErrorException:
00182     SessionException
00183 {
00184     std::string getPrefix() const { return "internal-error"; }
00185     InternalErrorException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_INTERNAL_ERROR, ""+msg) {}
00186 };
00187 
00195 struct InvalidArgumentException:
00196     SessionException
00197 {
00198     std::string getPrefix() const { return "invalid-argument"; }
00199     InvalidArgumentException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_INVALID_ARGUMENT, ""+msg) {}
00200 };
00201 
00202 sys::ExceptionHolder createSessionException(int code, const std::string& text);
00203 
00210 struct ConnectionForcedException:
00211     ConnectionException
00212 {
00213     std::string getPrefix() const { return "connection-forced"; }
00214     ConnectionForcedException(const std::string& msg=std::string()) : ConnectionException(connection::CLOSE_CODE_CONNECTION_FORCED, ""+msg) {}
00215 };
00216 
00222 struct InvalidPathException:
00223     ConnectionException
00224 {
00225     std::string getPrefix() const { return "invalid-path"; }
00226     InvalidPathException(const std::string& msg=std::string()) : ConnectionException(connection::CLOSE_CODE_INVALID_PATH, ""+msg) {}
00227 };
00228 
00234 struct FramingErrorException:
00235     ConnectionException
00236 {
00237     std::string getPrefix() const { return "framing-error"; }
00238     FramingErrorException(const std::string& msg=std::string()) : ConnectionException(connection::CLOSE_CODE_FRAMING_ERROR, ""+msg) {}
00239 };
00240 
00241 sys::ExceptionHolder createConnectionException(int code, const std::string& text);
00242 
00248 struct SessionBusyException:
00249     ChannelException
00250 {
00251     std::string getPrefix() const { return "session-busy"; }
00252     SessionBusyException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_SESSION_BUSY, ""+msg) {}
00253 };
00254 
00260 struct TransportBusyException:
00261     ChannelException
00262 {
00263     std::string getPrefix() const { return "transport-busy"; }
00264     TransportBusyException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_TRANSPORT_BUSY, ""+msg) {}
00265 };
00266 
00272 struct NotAttachedException:
00273     ChannelException
00274 {
00275     std::string getPrefix() const { return "not-attached"; }
00276     NotAttachedException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_NOT_ATTACHED, ""+msg) {}
00277 };
00278 
00284 struct UnknownIdsException:
00285     ChannelException
00286 {
00287     std::string getPrefix() const { return "unknown-ids"; }
00288     UnknownIdsException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_UNKNOWN_IDS, ""+msg) {}
00289 };
00290 
00291 sys::ExceptionHolder createChannelException(int code, const std::string& text);
00292 
00293 }} // namespace qpid::framing
00294 
00295 #endif  

Qpid C++ API Reference
Generated on Tue Dec 8 15:39:36 2009 for Qpid C++ Client API by doxygen 1.4.7