DOMException class Null safety

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 basically how error conditions are described in web APIs.

Each exception has a name, which is a short "PascalCase"-style string identifying the error or abnormal condition.

Implementers
Annotations

Constructors

DOMException([String? message = '', String? name = 'Error'])
factory

Properties

code int
Returns a short that contains one of the error code constants, or 0 if none match. This field is used for historical reasons. New DOM exceptions don't use this anymore: they put this info in the DOMException.name attribute.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
message String
Returns a DOMString representing a message or description associated with the given error name.
read-only
name String
Returns a DOMString that contains one of the strings associated with an error name.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Properties

ABORT_ERR int
read-only
DATA_CLONE_ERR int
read-only
DOMSTRING_SIZE_ERR int
read-only
HIERARCHY_REQUEST_ERR int
read-only
INDEX_SIZE_ERR int
read-only
INUSE_ATTRIBUTE_ERR int
read-only
INVALID_ACCESS_ERR int
read-only
INVALID_CHARACTER_ERR int
read-only
INVALID_MODIFICATION_ERR int
read-only
INVALID_NODE_TYPE_ERR int
read-only
INVALID_STATE_ERR int
read-only
NAMESPACE_ERR int
read-only
NETWORK_ERR int
read-only
NO_DATA_ALLOWED_ERR int
read-only
NO_MODIFICATION_ALLOWED_ERR int
read-only
NOT_FOUND_ERR int
read-only
NOT_SUPPORTED_ERR int
read-only
QUOTA_EXCEEDED_ERR int
read-only
SECURITY_ERR int
read-only
SYNTAX_ERR int
read-only
TIMEOUT_ERR int
read-only
TYPE_MISMATCH_ERR int
read-only
URL_MISMATCH_ERR int
read-only
VALIDATION_ERR int
read-only
WRONG_DOCUMENT_ERR int
read-only