Xerces-C++  3.1.2
List of all members
SAXParseException Class Reference

Encapsulate an XML parse error or warning. More...

Inheritance diagram for SAXParseException:
SAXException XMemory

Public Member Functions

Constructors and Destructor
 SAXParseException (const XMLCh *const message, const Locator &locator, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
 Create a new SAXParseException from a message and a Locator. More...
 
 SAXParseException (const XMLCh *const message, const XMLCh *const publicId, const XMLCh *const systemId, const XMLFileLoc lineNumber, const XMLFileLoc columnNumber, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
 Create a new SAXParseException. More...
 
 SAXParseException (const SAXParseException &toCopy)
 Copy constructor. More...
 
 ~SAXParseException ()
 Destructor. More...
 
Assignment operator
SAXParseExceptionoperator= (const SAXParseException &toAssign)
 Assignment operator. More...
 
Getter methods
XMLFileLoc getColumnNumber () const
 The column number of the end of the text where the exception occurred. More...
 
XMLFileLoc getLineNumber () const
 The line number of the end of the text where the exception occurred. More...
 
const XMLChgetPublicId () const
 Get the public identifier of the entity where the exception occurred. More...
 
const XMLChgetSystemId () const
 Get the system identifier of the entity where the exception occurred. More...
 
- Public Member Functions inherited from SAXException
 SAXException (MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
 Default constructor. More...
 
 SAXException (const XMLCh *const msg, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
 Create a new SAXException. More...
 
 SAXException (const char *const msg, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
 Create a new SAXException. More...
 
 SAXException (const SAXException &toCopy)
 Copy constructor. More...
 
virtual ~SAXException ()
 Destructor. More...
 
SAXExceptionoperator= (const SAXException &toCopy)
 Assignment operator. More...
 
virtual const XMLChgetMessage () const
 Get the contents of the message. More...
 
- Public Member Functions inherited from XMemory
void * operator new (size_t size)
 This method overrides operator new. More...
 
void * operator new (size_t size, MemoryManager *memMgr)
 This method defines a custom operator new, that will use the provided memory manager to perform the allocation. More...
 
void * operator new (size_t size, void *ptr)
 This method overrides placement operator new. More...
 
void operator delete (void *p)
 This method overrides operator delete. More...
 
void operator delete (void *p, MemoryManager *memMgr)
 This method provides a matching delete for the custom operator new. More...
 
void operator delete (void *p, void *ptr)
 This method provides a matching delete for the placement new. More...
 

Additional Inherited Members

- Protected Member Functions inherited from XMemory
 XMemory ()
 Protected default constructor. More...
 
- Protected Attributes inherited from SAXException
XMLChfMsg
 
MemoryManagerfMemoryManager
 

Detailed Description

Encapsulate an XML parse error or warning.

This exception will include information for locating the error in the original XML document. Note that although the application will receive a SAXParseException as the argument to the handlers in the ErrorHandler interface, the application is not actually required to throw the exception; instead, it can simply read the information in it and take a different action.

Since this exception is a subclass of SAXException, it inherits the ability to wrap another exception.

See also
SAXException::SAXException
Locator::Locator
ErrorHandler::ErrorHandler

Constructor & Destructor Documentation

SAXParseException::SAXParseException ( const XMLCh *const  message,
const Locator locator,
MemoryManager *const  manager = XMLPlatformUtils::fgMemoryManager 
)

Create a new SAXParseException from a message and a Locator.

This constructor is especially useful when an application is creating its own exception from within a DocumentHandler callback.

Parameters
messageThe error or warning message.
locatorThe locator object for the error or warning.
managerPointer to the memory manager to be used to allocate objects.
See also
Locator::Locator
Parser::setLocale
SAXParseException::SAXParseException ( const XMLCh *const  message,
const XMLCh *const  publicId,
const XMLCh *const  systemId,
const XMLFileLoc  lineNumber,
const XMLFileLoc  columnNumber,
MemoryManager *const  manager = XMLPlatformUtils::fgMemoryManager 
)

Create a new SAXParseException.

This constructor is most useful for parser writers.

If the system identifier is a URL, the parser must resolve it fully before creating the exception.

Parameters
messageThe error or warning message.
publicIdThe public identifier of the entity that generated the error or warning.
systemIdThe system identifier of the entity that generated the error or warning.
lineNumberThe line number of the end of the text that caused the error or warning.
columnNumberThe column number of the end of the text that caused the error or warning.
managerPointer to the memory manager to be used to allocate objects.
See also
Parser::setLocale
SAXParseException::SAXParseException ( const SAXParseException toCopy)

Copy constructor.

Parameters
toCopyThe object to be copied
SAXParseException::~SAXParseException ( )

Destructor.

Member Function Documentation

XMLFileLoc SAXParseException::getColumnNumber ( ) const

The column number of the end of the text where the exception occurred.

The first column in a line is position 1.

Returns
An integer representing the column number, or 0 if none is available.
See also
Locator::getColumnNumber
XMLFileLoc SAXParseException::getLineNumber ( ) const

The line number of the end of the text where the exception occurred.

Returns
An integer representing the line number, or 0 if none is available.
See also
Locator::getLineNumber
const XMLCh* SAXParseException::getPublicId ( ) const

Get the public identifier of the entity where the exception occurred.

Returns
A string containing the public identifier, or null if none is available.
See also
Locator::getPublicId
const XMLCh* SAXParseException::getSystemId ( ) const

Get the system identifier of the entity where the exception occurred.

If the system identifier is a URL, it will be resolved fully.

Returns
A string containing the system identifier, or null if none is available.
See also
Locator::getSystemId
SAXParseException& SAXParseException::operator= ( const SAXParseException toAssign)

Assignment operator.

Parameters
toAssignThe object to be copied through assignment

The documentation for this class was generated from the following file: