Go to the documentation of this file.00001 #ifndef OMG_DDS_CORE_EXCEPTION_HPP_
00002 #define OMG_DDS_CORE_EXCEPTION_HPP_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <stdexcept>
00023 #include <string>
00024
00025 #include <dds/core/corefwd.hpp>
00026
00027
00028 namespace dds { namespace core {
00029
00030
00031 class Exception
00032 {
00033 protected:
00034 Exception();
00035 public:
00036 virtual ~Exception() throw ();
00037
00038 public:
00039 virtual const char* what() const throw () = 0;
00040 };
00041
00042 class Error : public Exception, public std::exception
00043 {
00044 public:
00045 Error();
00046 Error(const Error& src);
00047 public:
00048 virtual ~Error() throw ();
00049
00050 public:
00051 virtual const char* what() const throw ();
00052 };
00053
00054
00055 class AlreadyClosedError : public Exception, public std::logic_error
00056 {
00057 public:
00058 explicit AlreadyClosedError(const std::string& msg);
00059 AlreadyClosedError(const AlreadyClosedError& src);
00060 virtual ~AlreadyClosedError() throw ();
00061
00062 public:
00063 virtual const char* what() const throw ();
00064 };
00065
00066
00067 class IllegalOperationError : public Exception, public std::logic_error
00068 {
00069 public:
00070 explicit IllegalOperationError(const std::string& msg);
00071 IllegalOperationError(const IllegalOperationError& src);
00072 virtual ~IllegalOperationError() throw ();
00073
00074 public:
00075 virtual const char* what() const throw ();
00076 };
00077
00078
00079 class ImmutablePolicyError : public Exception, public std::logic_error
00080 {
00081 public:
00082 explicit ImmutablePolicyError(const std::string& msg);
00083 ImmutablePolicyError(const ImmutablePolicyError& src);
00084 virtual ~ImmutablePolicyError() throw ();
00085
00086 public:
00087 virtual const char* what() const throw ();
00088 };
00089
00090
00091 class InconsistentPolicyError : public Exception, public std::logic_error
00092 {
00093 public:
00094 explicit InconsistentPolicyError(const std::string& msg);
00095 InconsistentPolicyError(const InconsistentPolicyError& src);
00096 virtual ~InconsistentPolicyError() throw ();
00097
00098 public:
00099 virtual const char* what() const throw ();
00100 };
00101
00102
00103 class InvalidArgumentError : public Exception, public std::invalid_argument
00104 {
00105 public:
00106 explicit InvalidArgumentError(const std::string& msg);
00107 InvalidArgumentError(const InvalidArgumentError& src);
00108 virtual ~InvalidArgumentError() throw ();
00109
00110 public:
00111 virtual const char* what() const throw ();
00112 };
00113
00114
00115 class NotEnabledError : public Exception, public std::logic_error
00116 {
00117 public:
00118 explicit NotEnabledError(const std::string& msg);
00119 NotEnabledError(const NotEnabledError& src);
00120 virtual ~NotEnabledError() throw ();
00121
00122 public:
00123 virtual const char* what() const throw ();
00124 };
00125
00126
00127 class OutOfResourcesError : public Exception, public std::runtime_error
00128 {
00129 public:
00130 explicit OutOfResourcesError(const std::string& msg);
00131 OutOfResourcesError(const OutOfResourcesError& src);
00132 virtual ~OutOfResourcesError() throw ();
00133
00134 public:
00135 virtual const char* what() const throw ();
00136 };
00137
00138
00139 class PreconditionNotMetError : public Exception, public std::logic_error
00140 {
00141 public:
00142 explicit PreconditionNotMetError(const std::string& msg);
00143 PreconditionNotMetError(const PreconditionNotMetError& src);
00144 virtual ~PreconditionNotMetError() throw ();
00145
00146 public:
00147 virtual const char* what() const throw ();
00148 };
00149
00150
00151 class TimeoutError : public Exception, public std::runtime_error
00152 {
00153 public:
00154 explicit TimeoutError(const std::string& msg);
00155 TimeoutError(const TimeoutError& src);
00156 virtual ~TimeoutError() throw ();
00157
00158 public:
00159 virtual const char* what() const throw ();
00160 };
00161
00162
00163 class UnsupportedError : public Exception, public std::logic_error
00164 {
00165 public:
00166 explicit UnsupportedError(const std::string& msg);
00167 UnsupportedError(const UnsupportedError& src);
00168 virtual ~UnsupportedError() throw ();
00169
00170 public:
00171 virtual const char* what() const throw ();
00172 };
00173
00174 class InvalidDowncastError : public Exception, public std::runtime_error
00175 {
00176 public:
00177 explicit InvalidDowncastError(const std::string& msg);
00178 InvalidDowncastError(const InvalidDowncastError& src);
00179 virtual ~InvalidDowncastError() throw();
00180
00181 public:
00182 virtual const char* what() const throw ();
00183 };
00184
00185 class NullReferenceError : public Exception, public std::runtime_error
00186 {
00187 public:
00188 explicit NullReferenceError(const std::string& msg);
00189 NullReferenceError(const NullReferenceError& src);
00190 virtual ~NullReferenceError() throw();
00191
00192 public:
00193 virtual const char* what() const throw ();
00194 };
00195
00196
00197 class InvalidDataError : public Exception, public std::logic_error
00198 {
00199 public:
00200 explicit InvalidDataError(const std::string& msg);
00201 InvalidDataError(const UnsupportedError& src);
00202 virtual ~InvalidDataError() throw ();
00203
00204 public:
00205 virtual const char* what() const throw ();
00206 };
00207
00208 }}
00209
00210 #endif