Go to the documentation of this file.
   22 #if !defined(XERCESC_INCLUDE_GUARD_XMLEXCEPTION_HPP) 
   23 #define XERCESC_INCLUDE_GUARD_XMLEXCEPTION_HPP 
   27 #include <xercesc/util/XMLExceptMsgs.hpp> 
   54     virtual const XMLCh* getType() 
const = 0;
 
   60     XMLExcepts::Codes getCode() 
const;
 
   61     const XMLCh* getMessage() 
const;
 
   62     const char* getSrcFile() 
const;
 
   70     void setPosition(
const char* 
const file, 
const XMLFileLoc line);
 
   93         const   XMLExcepts::Codes toLoad
 
   97         const   XMLExcepts::Codes toLoad
 
   98         , 
const XMLCh* 
const        text1
 
   99         , 
const XMLCh* 
const        text2 = 0
 
  100         , 
const XMLCh* 
const        text3 = 0
 
  101         , 
const XMLCh* 
const        text4 = 0
 
  105         const   XMLExcepts::Codes toLoad
 
  106         , 
const char* 
const         text1
 
  107         , 
const char* 
const         text2 = 0
 
  108         , 
const char* 
const         text3 = 0
 
  109         , 
const char* 
const         text4 = 0
 
  128     XMLExcepts::Codes       fCode;
 
  164    if ((fCode >= XMLExcepts::W_LowBounds) && (fCode <= XMLExcepts::W_HighBounds))
 
  166    else if ((fCode >= XMLExcepts::F_LowBounds) && (fCode <= XMLExcepts::F_HighBounds))
 
  168    else if ((fCode >= XMLExcepts::E_LowBounds) && (fCode <= XMLExcepts::E_HighBounds))
 
  178 #define MakeXMLException(theType, expKeyword) \ 
  179 class expKeyword theType : public XMLException \ 
  183     theType(const   char* const         srcFile \ 
  184             , const XMLFileLoc          srcLine \ 
  185             , const XMLExcepts::Codes toThrow \ 
  186             , MemoryManager*            memoryManager = 0) : \ 
  187         XMLException(srcFile, srcLine, memoryManager) \ 
  189         loadExceptText(toThrow); \ 
  192     theType(const theType& toCopy) : \ 
  194         XMLException(toCopy) \ 
  198     theType(const   char* const         srcFile \ 
  199             , const XMLFileLoc          srcLine \ 
  200             , const XMLExcepts::Codes   toThrow \ 
  201             , const XMLCh* const        text1 \ 
  202             , const XMLCh* const        text2 = 0 \ 
  203             , const XMLCh* const        text3 = 0 \ 
  204             , const XMLCh* const        text4 = 0 \ 
  205             , MemoryManager*            memoryManager = 0) : \ 
  206         XMLException(srcFile, srcLine, memoryManager) \ 
  208         loadExceptText(toThrow, text1, text2, text3, text4); \ 
  211     theType(const   char* const         srcFile \ 
  212             , const XMLFileLoc          srcLine \ 
  213             , const XMLExcepts::Codes   toThrow \ 
  214             , const char* const         text1 \ 
  215             , const char* const         text2 = 0 \ 
  216             , const char* const         text3 = 0 \ 
  217             , const char* const         text4 = 0 \ 
  218             , MemoryManager*            memoryManager = 0) : \ 
  219         XMLException(srcFile, srcLine, memoryManager) \ 
  221         loadExceptText(toThrow, text1, text2, text3, text4); \ 
  224     virtual ~theType() {} \ 
  226     theType& operator=(const theType& toAssign) \ 
  228         XMLException::operator=(toAssign); \ 
  232     virtual XMLException* duplicate() const \ 
  234         return new (fMemoryManager) theType(*this); \ 
  237     virtual const XMLCh* getType() const \ 
  239         return XMLUni::fg##theType##_Name; \ 
  254 #define ThrowXML(type,code) throw type(__FILE__, __LINE__, code) 
  256 #define ThrowXML1(type,code,p1) throw type(__FILE__, __LINE__, code, p1) 
  258 #define ThrowXML2(type,code,p1,p2) throw type(__FILE__, __LINE__, code, p1, p2) 
  260 #define ThrowXML3(type,code,p1,p2,p3) throw type(__FILE__, __LINE__, code, p1, p2, p3) 
  262 #define ThrowXML4(type,code,p1,p2,p3,p4) throw type(__FILE__, __LINE__, code, p1, p2, p3, p4) 
  264 #define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr) 
  266 #define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr) 
  268 #define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr) 
  270 #define ThrowXMLwithMemMgr3(type,code,p1,p2,p3,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, p3, 0, memMgr) 
  272 #define ThrowXMLwithMemMgr4(type,code,p1,p2,p3,p4,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, p3, p4, memMgr) 
  
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition: XMemory.hpp:40
XMLFileLoc getSrcLine() const
Definition: XMLException.hpp:157
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
ErrTypes
Definition: XMLErrorReporter.hpp:48
const char * getSrcFile() const
Definition: XMLException.hpp:150
@ ErrType_Error
Definition: XMLErrorReporter.hpp:51
const XMLCh * getMessage() const
Definition: XMLException.hpp:145
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
@ ErrType_Warning
Definition: XMLErrorReporter.hpp:50
#define XMLUTIL_EXPORT
Definition: XercesDefs.hpp:162
XMLUInt64 XMLFileLoc
Definition: Xerces_autoconf_config.hpp:144
uint16_t XMLCh
Definition: Xerces_autoconf_config.hpp:120
@ ErrType_Fatal
Definition: XMLErrorReporter.hpp:52
Definition: XMLException.hpp:42
MemoryManager * fMemoryManager
Definition: XMLException.hpp:134
Configurable memory manager.
Definition: MemoryManager.hpp:39
@ ErrTypes_Unknown
Definition: XMLErrorReporter.hpp:54
XMLExcepts::Codes getCode() const
Definition: XMLException.hpp:140
XMLErrorReporter::ErrTypes getErrorType() const
Definition: XMLException.hpp:162