00001 #ifndef DOMException_HEADER_GUARD_
00002 #define DOMException_HEADER_GUARD_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <xercesc/util/XercesDefs.hpp>
00026 #include <xercesc/util/PlatformUtils.hpp>
00027
00028 XERCES_CPP_NAMESPACE_BEGIN
00029
00030
00050 class MemoryManager;
00051
00052 class DOMException {
00053 public:
00054
00055
00056
00063 DOMException();
00064
00072 DOMException(
00073 short code
00074 , const XMLCh* message
00075 , MemoryManager* const memoryManager = XMLPlatformUtils::fgMemoryManager
00076 );
00077
00083 DOMException(const DOMException &other);
00084
00086
00087
00088
00089
00096 virtual ~DOMException();
00098
00099 public:
00100
00101
00102
00179 enum ExceptionCode {
00180 INDEX_SIZE_ERR = 1,
00181 DOMSTRING_SIZE_ERR = 2,
00182 HIERARCHY_REQUEST_ERR = 3,
00183 WRONG_DOCUMENT_ERR = 4,
00184 INVALID_CHARACTER_ERR = 5,
00185 NO_DATA_ALLOWED_ERR = 6,
00186 NO_MODIFICATION_ALLOWED_ERR = 7,
00187 NOT_FOUND_ERR = 8,
00188 NOT_SUPPORTED_ERR = 9,
00189 INUSE_ATTRIBUTE_ERR = 10,
00190 INVALID_STATE_ERR = 11,
00191 SYNTAX_ERR = 12,
00192 INVALID_MODIFICATION_ERR = 13,
00193 NAMESPACE_ERR = 14,
00194 INVALID_ACCESS_ERR = 15,
00195 VALIDATION_ERR = 16
00196 };
00198
00199
00200
00201
00202 inline const XMLCh* getMessage() const;
00203
00204
00205
00206
00213 ExceptionCode code;
00214
00221 const XMLCh *msg;
00223
00224 protected:
00225
00226 MemoryManager* fMemoryManager;
00227
00228 private:
00229
00237 bool fMsgOwned;
00238
00239 private:
00240
00241
00242
00243 DOMException & operator = (const DOMException &);
00244 };
00245
00246 inline const XMLCh* DOMException::getMessage() const
00247 {
00248 return msg;
00249 }
00250
00251 XERCES_CPP_NAMESPACE_END
00252
00253 #endif
00254