DOMException
The DOMException interface represents an abnormal event (called an exception) that occurs as a result of calling a method or accessing a property of a web API. This is how error conditions are described in web APIs.
Extends
Error
Extended by
Properties
ABORT_ERR
readonly ABORT_ERR: 20;
cause?
optional cause?: unknown;
Inherited from
Error.cause
code
readonly code: number;
The code read-only property of the DOMException interface returns one of the legacy error code constants, or 0 if none match.
Deprecated
DATA_CLONE_ERR
readonly DATA_CLONE_ERR: 25;
DOMSTRING_SIZE_ERR
readonly DOMSTRING_SIZE_ERR: 2;
HIERARCHY_REQUEST_ERR
readonly HIERARCHY_REQUEST_ERR: 3;
INDEX_SIZE_ERR
readonly INDEX_SIZE_ERR: 1;
INUSE_ATTRIBUTE_ERR
readonly INUSE_ATTRIBUTE_ERR: 10;
INVALID_ACCESS_ERR
readonly INVALID_ACCESS_ERR: 15;
INVALID_CHARACTER_ERR
readonly INVALID_CHARACTER_ERR: 5;
INVALID_MODIFICATION_ERR
readonly INVALID_MODIFICATION_ERR: 13;
INVALID_NODE_TYPE_ERR
readonly INVALID_NODE_TYPE_ERR: 24;
INVALID_STATE_ERR
readonly INVALID_STATE_ERR: 11;
message
readonly message: string;
The message read-only property of the DOMException interface returns a string representing a message or description associated with the given error name.
Overrides
Error.message
name
readonly name: string;
The name read-only property of the DOMException interface returns a string that contains one of the strings associated with an error name.
Overrides
Error.name
NAMESPACE_ERR
readonly NAMESPACE_ERR: 14;
NETWORK_ERR
readonly NETWORK_ERR: 19;
NO_DATA_ALLOWED_ERR
readonly NO_DATA_ALLOWED_ERR: 6;
NO_MODIFICATION_ALLOWED_ERR
readonly NO_MODIFICATION_ALLOWED_ERR: 7;
NOT_FOUND_ERR
readonly NOT_FOUND_ERR: 8;
NOT_SUPPORTED_ERR
readonly NOT_SUPPORTED_ERR: 9;
QUOTA_EXCEEDED_ERR
readonly QUOTA_EXCEEDED_ERR: 22;
SECURITY_ERR
readonly SECURITY_ERR: 18;
stack?
optional stack?: string;
Inherited from
Error.stack
SYNTAX_ERR
readonly SYNTAX_ERR: 12;
TIMEOUT_ERR
readonly TIMEOUT_ERR: 23;
TYPE_MISMATCH_ERR
readonly TYPE_MISMATCH_ERR: 17;
URL_MISMATCH_ERR
readonly URL_MISMATCH_ERR: 21;
VALIDATION_ERR
readonly VALIDATION_ERR: 16;
WRONG_DOCUMENT_ERR
readonly WRONG_DOCUMENT_ERR: 4;