00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(XERCESC_INCLUDE_GUARD_DOMEXCEPTION_HPP)
00023 #define XERCESC_INCLUDE_GUARD_DOMEXCEPTION_HPP
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 CDOM_EXPORT DOMException {
00053 public:
00054
00055
00056
00137 enum ExceptionCode {
00138 INDEX_SIZE_ERR = 1,
00139 DOMSTRING_SIZE_ERR = 2,
00140 HIERARCHY_REQUEST_ERR = 3,
00141 WRONG_DOCUMENT_ERR = 4,
00142 INVALID_CHARACTER_ERR = 5,
00143 NO_DATA_ALLOWED_ERR = 6,
00144 NO_MODIFICATION_ALLOWED_ERR = 7,
00145 NOT_FOUND_ERR = 8,
00146 NOT_SUPPORTED_ERR = 9,
00147 INUSE_ATTRIBUTE_ERR = 10,
00148 INVALID_STATE_ERR = 11,
00149 SYNTAX_ERR = 12,
00150 INVALID_MODIFICATION_ERR = 13,
00151 NAMESPACE_ERR = 14,
00152 INVALID_ACCESS_ERR = 15,
00153 VALIDATION_ERR = 16,
00154 TYPE_MISMATCH_ERR = 17
00155 };
00157
00158 public:
00159
00160
00161
00168 DOMException();
00169
00177 DOMException(short code,
00178 short messageCode = 0,
00179 MemoryManager* const memoryManager = XMLPlatformUtils::fgMemoryManager);
00180
00186 DOMException(const DOMException &other);
00187
00189
00190
00191
00192
00199 virtual ~DOMException();
00201
00202
00203 public:
00204
00205
00206
00207 inline const XMLCh* getMessage() const;
00208
00209
00210
00211
00218 short code;
00219
00226 const XMLCh *msg;
00228
00229 protected:
00230 MemoryManager* fMemoryManager;
00231
00232 private:
00233
00241 bool fMsgOwned;
00242
00243 private:
00244
00245
00246
00247 DOMException & operator = (const DOMException &);
00248 };
00249
00250 inline const XMLCh* DOMException::getMessage() const
00251 {
00252 return msg;
00253 }
00254
00255 XERCES_CPP_NAMESPACE_END
00256
00257 #endif