Cross-Platform C++

ot::sax
class SAXParseException

#include "ot/sax/SAXParseException.h"

ot::sax::SAXException ot::Exception Encapsulate an XML parse error or warning.

This exception may include information for locating the error in the original XML document, as if it came from a Locator object. 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.




Constructor/Destructor Summary
SAXParseException(const String& message, const Locator& locator)
         Create a new SAXParseException from a message and a Locator.
SAXParseException(const String& message, const String& publicId, const String& systemId, long lineNumber, long columnNumber)
         Create a new SAXParseException.

Method Summary
 virtual long getColumnNumber() const
         Returns the column number of the end of the text where the exception occurred.
 virtual String getExceptionType() const
         Returns the class name as a String.
 virtual long getLineNumber() const
         Returns the line number of the end of the text where the exception occurred.
 virtual String getPublicId() const
         Get the public identifier of the entity where the exception occurred.
 virtual String getSystemId() const
         Get the system identifier of the entity where the exception occurred.

Methods inherited from class ot::Exception
getDescription, getLocalizedDescription, getMessage, setMessage, toString

Constructor/Destructor Detail

SAXParseException

 SAXParseException(const String& message,
                   const Locator& locator)
Create a new SAXParseException from a message and a Locator. The information from the Locator is copied into internal state variables.

Parameters:
message - The error or warning message.
locator - A Locator object giving the location within the document where the error occurred.

SAXParseException

 SAXParseException(const String& message,
                   const String& publicId,
                   const String& systemId,
                   long lineNumber,
                   long columnNumber)
Create a new SAXParseException. All parameters except the message are as if they were provided by a Locator.

Parameters:
message - The error or warning message.
publicId - The public identifier of the entity that generated the error or warning.
systemId - The system identifier of the entity that generated the error or warning.
lineNumber - The line number of the end of the text that caused the error or warning.
columnNumber - The column number of the end of the text that cause the error or warning

Method Detail

getColumnNumber

virtual long getColumnNumber() const
Returns 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 -1 if none is available.
See also:
Locator::getColumnNumber()

getExceptionType

virtual String getExceptionType() const
Returns the class name as a String. This method should be overridden in all derived classes to return the name of the derived class.

See also:
getDescription()

getLineNumber

virtual long getLineNumber() const
Returns the line number of the end of the text where the exception occurred.

The first line is line 1.

Returns:
An integer representing the line number, or -1 if none is available.
See also:
Locator::getLineNumber()

getPublicId

virtual String getPublicId() const
Get the public identifier of the entity where the exception occurred.

Returns:
A string containing the public identifier, or the empty string if none is available.
See also:
Locator::getPublicId()

getSystemId

virtual String getSystemId() const
Get the system identifier of the entity where the exception occurred.

Returns:
A string containing the system identifier, or the empty string if none is available.
See also:
Locator::getSystemId()


Cross-Platform C++

Found a bug or missing feature? Please email us at support@elcel.com

Copyright © 2000-2003 ElCel Technology   Trademark Acknowledgements