Xerces-C++ 3.3.0
DOMException Class Reference

#include <xercesc/dom/DOMException.hpp>

Inheritance diagram for DOMException:
DOMLSException DOMRangeException DOMXPathException

Public Types

Public Constants
enum  ExceptionCode {
  INDEX_SIZE_ERR = 1 , DOMSTRING_SIZE_ERR = 2 , HIERARCHY_REQUEST_ERR = 3 , WRONG_DOCUMENT_ERR = 4 ,
  INVALID_CHARACTER_ERR = 5 , NO_DATA_ALLOWED_ERR = 6 , NO_MODIFICATION_ALLOWED_ERR = 7 , NOT_FOUND_ERR = 8 ,
  NOT_SUPPORTED_ERR = 9 , INUSE_ATTRIBUTE_ERR = 10 , INVALID_STATE_ERR = 11 , SYNTAX_ERR = 12 ,
  INVALID_MODIFICATION_ERR = 13 , NAMESPACE_ERR = 14 , INVALID_ACCESS_ERR = 15 , VALIDATION_ERR = 16 ,
  TYPE_MISMATCH_ERR = 17
}
 ExceptionCode. More...
 

Public Member Functions

Constructors
 DOMException ()
 Default constructor for DOMException.
 
 DOMException (short code, short messageCode=0, MemoryManager *const memoryManager=XMLPlatformUtils::fgMemoryManager)
 Constructor which takes an error code and an optional message code.
 
 DOMException (const DOMException &other)
 Copy constructor.
 
Destructor.
virtual ~DOMException ()
 Destructor for DOMException.
 
const XMLChgetMessage () const
 

Public variables

short code
 A code value, from the set defined by the ExceptionCode enum, indicating the type of error that occured.
 
const XMLChmsg
 A string value.
 
MemoryManagerfMemoryManager
 

Member Enumeration Documentation

◆ ExceptionCode

ExceptionCode.

INDEX_SIZE_ERR: If index or size is negative, or greater than the allowed value.

DOMSTRING_SIZE_ERR: If the specified range of text does not fit into a DOMString.

HIERARCHY_REQUEST_ERR: If any node is inserted somewhere it doesn't belong.

WRONG_DOCUMENT_ERR: If a node is used in a different document than the one that created it (that doesn't support it).

INVALID_CHARACTER_ERR: If an invalid or illegal character is specified, such as in a name. See production 2 in the XML specification for the definition of a legal character, and production 5 for the definition of a legal name character.

NO_DATA_ALLOWED_ERR: If data is specified for a node which does not support data.

NO_MODIFICATION_ALLOWED_ERR: If an attempt is made to modify an object where modifications are not allowed.

NOT_FOUND_ERR: If an attempt is made to reference a node in a context where it does not exist.

NOT_SUPPORTED_ERR: If the implementation does not support the requested type of object or operation.

INUSE_ATTRIBUTE_ERR: If an attempt is made to add an attribute that is already in use elsewhere.

The above are since DOM Level 1

Since
DOM Level 1

INVALID_STATE_ERR: If an attempt is made to use an object that is not, or is no longer, usable.

SYNTAX_ERR: If an invalid or illegal string is specified.

INVALID_MODIFICATION_ERR: If an attempt is made to modify the type of the underlying object.

NAMESPACE_ERR: If an attempt is made to create or change an object in a way which is incorrect with regard to namespaces.

INVALID_ACCESS_ERR: If a parameter or an operation is not supported by the underlying object.

The above are since DOM Level 2

Since
DOM Level 2

VALIDATION_ERR: If a call to a method such as insertBefore or removeChild would make the Node invalid with respect to "partial validity", this exception would be raised and the operation would not be done.

TYPE_MISMATCH_ERR: If the type of an object is incompatible with the expected type of the parameter associated to the object, this exception would be raised.

The above is since DOM Level 3

Since
DOM Level 3
Enumerator
INDEX_SIZE_ERR 
DOMSTRING_SIZE_ERR 
HIERARCHY_REQUEST_ERR 
WRONG_DOCUMENT_ERR 
INVALID_CHARACTER_ERR 
NO_DATA_ALLOWED_ERR 
NO_MODIFICATION_ALLOWED_ERR 
NOT_FOUND_ERR 
NOT_SUPPORTED_ERR 
INUSE_ATTRIBUTE_ERR 
INVALID_STATE_ERR 
SYNTAX_ERR 
INVALID_MODIFICATION_ERR 
NAMESPACE_ERR 
INVALID_ACCESS_ERR 
VALIDATION_ERR 
TYPE_MISMATCH_ERR 

Constructor & Destructor Documentation

◆ DOMException() [1/3]

DOMException::DOMException ( )

Default constructor for DOMException.

◆ DOMException() [2/3]

DOMException::DOMException ( short code,
short messageCode = 0,
MemoryManager *const memoryManager = XMLPlatformUtils::fgMemoryManager )

Constructor which takes an error code and an optional message code.

Parameters
codeThe error code which indicates the exception
messageCodeThe string containing the error message
memoryManagerThe memory manager used to (de)allocate memory

◆ DOMException() [3/3]

DOMException::DOMException ( const DOMException & other)

Copy constructor.

Parameters
otherThe object to be copied.

◆ ~DOMException()

virtual DOMException::~DOMException ( )
virtual

Destructor for DOMException.

Member Function Documentation

◆ getMessage()

const XMLCh * DOMException::getMessage ( ) const

References msg.

Member Data Documentation

◆ code

short DOMException::code

A code value, from the set defined by the ExceptionCode enum, indicating the type of error that occured.

◆ fMemoryManager

MemoryManager* DOMException::fMemoryManager
protected

◆ msg

const XMLCh* DOMException::msg

A string value.

Applications may use this field to hold an error message. The field value is not set by the DOM implementation, meaning that the string will be empty when an exception is first thrown.

Referenced by getMessage().


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