00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _CMS_XAEXCEPTION_H_
00019 #define _CMS_XAEXCEPTION_H_
00020
00021 #include <cms/Config.h>
00022 #include <cms/CMSException.h>
00023
00024 namespace cms {
00025
00032 class CMS_API XAException : public CMSException {
00033 private:
00034
00035 int errorCode;
00036
00037 public:
00038
00042 static const int XA_RBBASE;
00043
00047 static const int XA_RBROLLBACK;
00048
00052 static const int XA_RBCOMMFAIL;
00053
00057 static const int XA_RBDEADLOCK;
00058
00063 static const int XA_RBINTEGRITY;
00064
00069 static const int XA_RBOTHER;
00070
00074 static const int XA_RBPROTO;
00075
00079 static const int XA_RBTIMEOUT;
00080
00084 static const int XA_RBTRANSIENT;
00085
00089 static const int XA_RBEND;
00090
00094 static const int XA_NOMIGRATE;
00095
00100 static const int XA_HEURHAZ;
00101
00106 static const int XA_HEURCOM;
00107
00112 static const int XA_HEURRB;
00113
00118 static const int XA_HEURMIX;
00119
00124 static const int XA_RETRY;
00125
00130 static const int XA_RDONLY;
00131
00136 static const int XAER_ASYNC;
00137
00142 static const int XAER_RMERR;
00143
00147 static const int XAER_NOTA;
00148
00152 static const int XAER_INVAL;
00153
00157 static const int XAER_PROTO;
00158
00162 static const int XAER_RMFAIL;
00163
00167 static const int XAER_DUPID;
00168
00173 static const int XAER_OUTSIDE;
00174
00175 public:
00176
00177 XAException();
00178
00179 XAException(int errorCode);
00180
00181 XAException(const XAException& ex);
00182
00183 XAException(const std::string& message);
00184
00185 XAException(const std::string& message, const std::exception* cause);
00186
00187 XAException(const std::string& message, const std::exception* cause,
00188 const std::vector<std::pair<std::string, int> >& stackTrace);
00189
00190 virtual ~XAException() throw();
00191
00192 virtual XAException* clone();
00193
00194 public:
00195
00202 void setErrorCode(int errorCode) {
00203 this->errorCode = errorCode;
00204 }
00205
00211 int getErrorCode() const {
00212 return this->errorCode;
00213 }
00214
00215 };
00216
00217 }
00218
00219 #endif