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 #include <xercesc/util/XercesDefs.hpp>
00025 #include <xercesc/util/PlatformUtils.hpp>
00026
00027 XERCES_CPP_NAMESPACE_BEGIN
00028
00029
00049 class MemoryManager;
00050
00051 class CDOM_EXPORT DOMException {
00052 public:
00053
00054
00055
00062 DOMException();
00063
00071 DOMException(
00072 short code
00073 , const XMLCh* message
00074 , MemoryManager* const memoryManager = XMLPlatformUtils::fgMemoryManager
00075 );
00076
00082 DOMException(const DOMException &other);
00083
00085
00086
00087
00088
00095 virtual ~DOMException();
00097
00098 public:
00099
00100
00101
00178 enum ExceptionCode {
00179 INDEX_SIZE_ERR = 1,
00180 DOMSTRING_SIZE_ERR = 2,
00181 HIERARCHY_REQUEST_ERR = 3,
00182 WRONG_DOCUMENT_ERR = 4,
00183 INVALID_CHARACTER_ERR = 5,
00184 NO_DATA_ALLOWED_ERR = 6,
00185 NO_MODIFICATION_ALLOWED_ERR = 7,
00186 NOT_FOUND_ERR = 8,
00187 NOT_SUPPORTED_ERR = 9,
00188 INUSE_ATTRIBUTE_ERR = 10,
00189 INVALID_STATE_ERR = 11,
00190 SYNTAX_ERR = 12,
00191 INVALID_MODIFICATION_ERR = 13,
00192 NAMESPACE_ERR = 14,
00193 INVALID_ACCESS_ERR = 15,
00194 VALIDATION_ERR = 16
00195 };
00197
00198
00199
00200
00201 inline const XMLCh* getMessage() const;
00202
00203
00204
00205
00212 ExceptionCode code;
00213
00220 const XMLCh *msg;
00222
00223 protected:
00224
00225 MemoryManager* fMemoryManager;
00226
00227 private:
00228
00236 bool fMsgOwned;
00237
00238 private:
00239
00240
00241
00242 DOMException & operator = (const DOMException &);
00243 };
00244
00245 inline const XMLCh* DOMException::getMessage() const
00246 {
00247 return msg;
00248 }
00249
00250 XERCES_CPP_NAMESPACE_END
00251
00252 #endif
00253