Packagedom.core
Classpublic class ExceptionCode
InheritanceExceptionCode Inheritance Object

Introduced in: DOM 1 Core 
Modified in: DOM 3 Core 

An integer indicating the type of error generated.

Note: Other numeric codes are reserved for W3C for possible future use.

See also

W3C - DOM 3 Core: ExceptionCode


Public Constants
 ConstantDefined By
  DOM 1 Core DOMSTRING_SIZE_ERR : Number = 2
[static] If the specified range of text does not fit into a DOMString.
ExceptionCode
  DOM 1 Core HIERARCHY_REQUEST_ERR : Number = 3
[static] If any Node is inserted somewhere it doesn't belong.
ExceptionCode
  DOM 1 Core INDEX_SIZE_ERR : Number = 1
[static] If index or size is negative, or greater than the allowed value.
ExceptionCode
  DOM 1 Core INUSE_ATTRIBUTE_ERR : Number = 10
[static] If an attempt is made to add an attribute that is already in use elsewhere.
ExceptionCode
  DOM 2 Core INVALID_ACCESS_ERR : Number = 15
[static] If a parameter or an operation is not supported by the underlying object.
ExceptionCode
  DOM 1 Core INVALID_CHARACTER_ERR : Number = 5
[static] If an invalid or illegal character is specified, such as in an XML name.
ExceptionCode
  DOM 2 Core INVALID_MODIFICATION_ERR : Number = 13
[static] If an attempt is made to modify the type of the underlying object.
ExceptionCode
  DOM 2 Core INVALID_STATE_ERR : Number = 11
[static] If an attempt is made to use an object that is not, or is no longer, usable.
ExceptionCode
  DOM 2 Core NAMESPACE_ERR : Number = 14
[static] If an attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
ExceptionCode
  DOM 1 Core NO_DATA_ALLOWED_ERR : Number = 6
[static] If data is specified for a Node which does not support data.
ExceptionCode
  DOM 1 Core NO_MODIFICATION_ALLOWED_ERR : Number = 7
[static] If an attempt is made to modify an object where modifications are not allowed.
ExceptionCode
  DOM 1 Core NOT_FOUND_ERR : Number = 8
[static] If an attempt is made to reference a Node in a context where it does not exist.
ExceptionCode
  DOM 1 Core NOT_SUPPORTED_ERR : Number = 9
[static] If the implementation does not support the requested type of object or operation.
ExceptionCode
  DOM 2 Core SYNTAX_ERR : Number = 12
[static] If an invalid or illegal string is specified.
ExceptionCode
  DOM 3 Core TYPE_MISMATCH_ERR : Number = 17
[static] If the type of an object is incompatible with the expected type of the parameter associated to the object.
ExceptionCode
  DOM 3 Core VALIDATION_ERR : Number = 16
[static] 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.
ExceptionCode
  DOM 1 Core WRONG_DOCUMENT_ERR : Number = 5
[static] If a Node is used in a different document than the one that created it (that doesn't support it).
ExceptionCode
Constant Detail
DOM 1 Core DOMSTRING_SIZE_ERRConstant
public static const DOMSTRING_SIZE_ERR:Number = 2

Introduced in: DOM 1 Core 

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

DOM 1 Core HIERARCHY_REQUEST_ERRConstant 
public static const HIERARCHY_REQUEST_ERR:Number = 3

Introduced in: DOM 1 Core 

If any Node is inserted somewhere it doesn't belong.

DOM 1 Core INDEX_SIZE_ERRConstant 
public static const INDEX_SIZE_ERR:Number = 1

Introduced in: DOM 1 Core 

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

DOM 1 Core INUSE_ATTRIBUTE_ERRConstant 
public static const INUSE_ATTRIBUTE_ERR:Number = 10

Introduced in: DOM 1 Core 

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

DOM 2 Core INVALID_ACCESS_ERRConstant 
public static const INVALID_ACCESS_ERR:Number = 15

Introduced in: DOM 2 Core 

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

DOM 1 Core INVALID_CHARACTER_ERRConstant 
public static const INVALID_CHARACTER_ERR:Number = 5

Introduced in: DOM 1 Core 

If an invalid or illegal character is specified, such as in an XML name.

DOM 2 Core INVALID_MODIFICATION_ERRConstant 
public static const INVALID_MODIFICATION_ERR:Number = 13

Introduced in: DOM 2 Core 

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

DOM 2 Core INVALID_STATE_ERRConstant 
public static const INVALID_STATE_ERR:Number = 11

Introduced in: DOM 2 Core 

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

DOM 2 Core NAMESPACE_ERRConstant 
public static const NAMESPACE_ERR:Number = 14

Introduced in: DOM 2 Core 

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

DOM 1 Core NO_DATA_ALLOWED_ERRConstant 
public static const NO_DATA_ALLOWED_ERR:Number = 6

Introduced in: DOM 1 Core 

If data is specified for a Node which does not support data.

DOM 1 Core NO_MODIFICATION_ALLOWED_ERRConstant 
public static const NO_MODIFICATION_ALLOWED_ERR:Number = 7

Introduced in: DOM 1 Core 

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

DOM 1 Core NOT_FOUND_ERRConstant 
public static const NOT_FOUND_ERR:Number = 8

Introduced in: DOM 1 Core 

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

DOM 1 Core NOT_SUPPORTED_ERRConstant 
public static const NOT_SUPPORTED_ERR:Number = 9

Introduced in: DOM 1 Core 

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

DOM 2 Core SYNTAX_ERRConstant 
public static const SYNTAX_ERR:Number = 12

Introduced in: DOM 2 Core 

If an invalid or illegal string is specified.

DOM 3 Core TYPE_MISMATCH_ERRConstant 
public static const TYPE_MISMATCH_ERR:Number = 17

Introduced in: DOM 3 Core 

If the type of an object is incompatible with the expected type of the parameter associated to the object.

DOM 3 Core VALIDATION_ERRConstant 
public static const VALIDATION_ERR:Number = 16

Introduced in: DOM 3 Core 

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. This code is used in [DOM Level 3 Validation]. Refer to this specification for further information.

DOM 1 Core WRONG_DOCUMENT_ERRConstant 
public static const WRONG_DOCUMENT_ERR:Number = 5

Introduced in: DOM 1 Core 

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