Base Framework
Public Types | Public Member Functions | List of all members
SAXParseException Class Reference

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

#include <base/xml/SAXParseException.h>

Inherits SAXException.

Public Types

enum  Cause { NOT_WELL_FORMED }
 
- Public Types inherited from Exception
enum  DumpOnThrow { DUMP_ON_THROW_NO = 0, DUMP_ON_THROW_EXCEPTION, DUMP_ON_THROW_STACK }
 
typedef void(* ExceptionHandler) (const Exception *exception)
 

Public Member Functions

 SAXParseException () noexcept
 
 SAXParseException (const char *message) noexcept
 
 SAXParseException (const Type &type) noexcept
 
 SAXParseException (const char *message, const Type &type) noexcept
 
 SAXParseException (const char *message, Type type, String _publicId, String _systemId, unsigned int _line, unsigned int _column) noexcept
 
unsigned int getLine () const noexcept
 
unsigned int getColumn () const noexcept
 
const StringgetPublicId () const noexcept
 
const StringgetSystemId () const noexcept
 
- Public Member Functions inherited from SAXException
 SAXException () noexcept
 
 SAXException (const char *message) noexcept
 
 SAXException (const Type &type) noexcept
 
 SAXException (const char *message, const Type &type) noexcept
 
- Public Member Functions inherited from Exception
 Exception () noexcept
 
 Exception (const char *message) noexcept
 
 Exception (const Type &type) noexcept
 
 Exception (const char *message, const Type &type) noexcept
 
 Exception (const Exception &copy) noexcept
 
 Exception (Exception &&move) noexcept
 
unsigned int getCause () const noexcept
 
void setCause (unsigned int cause) noexcept
 
unsigned int getError () const noexcept
 
void setError (unsigned int error) noexcept
 
const char * getMessage () const noexcept
 
void setMessage (const char *message) noexcept
 
template<decltype(sizeof(void *)) SIZE>
void setMessage (const char(&_message)[SIZE]) noexcept
 
virtual Type getThisType () const noexcept
 
const TypegetType () const noexcept
 
void setType (const Type &type) noexcept
 
virtual bool isCommonException () const noexcept
 
OwnedNativeString getHTML () const
 
virtual ~Exception () noexcept
 

Additional Inherited Members

- Static Public Member Functions inherited from Exception
static void onThrow (const Exception &exception) noexcept
 
static void rethrow ()
 
static bool getDumpExceptions () noexcept
 
static void setDumpExceptions (bool _dumpExceptions) noexcept
 
static ExceptionHandler setExceptionHandler (ExceptionHandler _exceptionHandler) noexcept
 
static bool hasPendingException () noexcept
 
static bool isUnwinding () noexcept
 
static unsigned int getPendingExceptions () noexcept
 
static const char * getStdExceptionName (const std::exception &e) noexcept
 
static Type getExceptionType () noexcept
 
static StackTrace getStackTrace ()
 
static void setDumpOnThrow (DumpOnThrow dumpOnThrow) noexcept
 
- Static Public Attributes inherited from Exception
static constexpr bool SUPPORTS_EXCEPTIONS = true
 

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.

Version
1.0

Member Enumeration Documentation

◆ Cause

Exception causes.

Enumerator
NOT_WELL_FORMED 

The document is not well-formed.

Constructor & Destructor Documentation

◆ SAXParseException() [1/5]

SAXParseException::SAXParseException ( )
inlinenoexcept

Initializes the exception with no message.

◆ SAXParseException() [2/5]

SAXParseException::SAXParseException ( const char *  message)
inlinenoexcept

Initializes the exception with the specified message.

◆ SAXParseException() [3/5]

SAXParseException::SAXParseException ( const Type type)
inlinenoexcept

Initializes the exception object without an associated message.

Parameters
typeThe identity of the type.

◆ SAXParseException() [4/5]

SAXParseException::SAXParseException ( const char *  message,
const Type type 
)
inlinenoexcept

Initializes the exception object.

Parameters
messageAn NULL-terminated string (ASCII).
typeThe identity of the type.

◆ SAXParseException() [5/5]

SAXParseException::SAXParseException ( const char *  message,
Type  type,
String  _publicId,
String  _systemId,
unsigned int  _line,
unsigned int  _column 
)
inlinenoexcept

Initializes the exception object.

Parameters
messageAn NULL-terminated string (ASCII).
typeThe identity of the type.
publicIdThe public identifier of the entity where the exception occurred.
systemIdThe system identifier of the entity where the exception occurred.
lineThe line number.
columnThe column number.

Member Function Documentation

◆ getColumn()

unsigned int SAXParseException::getColumn ( ) const
inlinenoexcept

Returns the column number.

◆ getLine()

unsigned int SAXParseException::getLine ( ) const
inlinenoexcept

Returns the line number.

◆ getPublicId()

const String& SAXParseException::getPublicId ( ) const
inlinenoexcept

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

◆ getSystemId()

const String& SAXParseException::getSystemId ( ) const
inlinenoexcept

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