فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("DOM")}}{{non-standard_header}}

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

Instance properties

  • {{domxref("DOMError.name")}} {{ReadOnlyInline}} {{Deprecated_Inline}} {{non-standard_inline}}
  • : Returns a string representing one of the error type names (see below).
  • {{domxref("DOMError.message")}} {{ReadOnlyInline}} {{Deprecated_Inline}} {{non-standard_inline}}
  • : 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 {{ domxref("range") }} object).
HierarchyRequestErrorThe node tree hierarchy is not correct.
WrongDocumentErrorThe object is in the wrong {{ domxref("document") }}.
InvalidCharacterErrorThe string contains invalid characters.
NoModificationAllowedErrorThe object cannot be modified.
NotFoundErrorThe object cannot 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 cannot 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 cannot be cloned.

Browser compatibility

{{Compat}}

See also

  • {{ domxref("DOMException") }}