DOMError

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.

The DOMError interface describes an error object that contains an error name.

Instance properties

DOMError.name Read only

Returns a string representing one of the error type names (see below).

DOMError.message Read only

Returns a string representing a message or description associated with the given error type name.

Error types

TypeDescription
IndexSizeErrorThe index is not in the allowed range (e.g., thrown in a range object).
HierarchyRequestErrorThe node tree hierarchy is not correct.
WrongDocumentErrorThe object is in the wrong document.
InvalidCharacterErrorThe string contains invalid characters.
NoModificationAllowedErrorThe object can not be modified.
NotFoundErrorThe object can not be found here.
NotSupportedErrorThe operation is not supported
InvalidStateErrorThe object is in an invalid state.
SyntaxErrorThe string did not match the expected pattern.
InvalidModificationErrorThe object can not be modified in this way.
NamespaceErrorThe operation is not allowed by Namespaces in XML
InvalidAccessErrorThe object does not support the operation or argument.
TypeMismatchErrorThe type of the object does not match the expected type.
SecurityErrorThe operation is insecure.
NetworkErrorA network error occurred.
AbortErrorThe operation was aborted.
URLMismatchErrorThe given URL does not match another URL.
TimeoutErrorThe operation timed out.
InvalidNodeTypeErrorThe node is incorrect or has an incorrect ancestor for this operation.
DataCloneErrorThe object can not be cloned.

See also