Platform Support
IE | Mozilla | Netscape | Opera | Safari | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
---|
Constructors
Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | ||
---|---|---|---|---|---|---|---|---|
DOMException Constructor() : DOMException
Interface defining error codes for DOM-related processing exceptions.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | ||
DOMException() : DOMExceptionInterface defining error codes for DOM-related processing exceptions. Returns
|
Properties
Property | Action | IE | Mozilla | Netscape | Opera | Safari |
---|---|---|---|---|---|---|
INDEX_SIZE_ERR
: Number
Thrown if the index or size is either negative or greater than the allowed value.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
DOMSTRING_SIZE_ERR
: Number
Code used when the specified range of text cannot fit into a String.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
HIERARCHY_REQUEST_ERR
: Number
Code used when a node is inserted where it doesn't belong
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
WRONG_DOCUMENT_ERR
: Number
Code used when the node being specified does not exist in the current document
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
INVALID_CHARACTER_ERR
: Number
Code used when an illegal character is used
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
NO_DATA_ALLOWED_ERR
: Number
Code used when data is supplied to a node that does not support it
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
NO_MODIFICATION_ALLOWED_ERR
: Number
Code used when modifications are made to an object where modifications are not permitted
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
NOT_FOUND_ERR
: Number
Code used when a node is referenced that does not exist in the current context
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
NOT_SUPPORTED_ERR
: Number
Code used when the implementation does not support the requested type or object
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
INUSE_ATTRIBUTE_ERR
: Number
Code used when an added attribute that already exists elsewhere
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
INVALID_STATE_ERR
: Number
Code used when an object is used that no longer exists
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
SYNTAX_ERR
: Number
Code used when an invalid string is specified
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
INVALID_MODIFICATION_ERR
: Number
Code used when an attempt is made to change the type of an object
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
NAMESPACE_ERR
: Number
Code used when a change is made that is invalid in relation to namespaces
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
INVALID_ACCESS_ERR
: Number
Code used when an operation is not supported by an object
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
code
: Number
Code corresponding to the type of DOMException thrown.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
Remarks
When some exceptional error situations arise during DOM manipulation, the method or object will raise an exception using the appropriate result code. Usually DOM methods will return specific error codes that correspond to the error involved and will not throw an exception. Therefore, this method will only be used in situations where the operation is impossible to recover from or perform. This usually arises when data is lost, the implementation is unstable, or for logical reasons.
References
Availability
HTML DOM Level 2|W3C