DomException Class

https://webidl.spec.whatwg.org/#idl-DOMException

public class DomException : Exception
Inheritance
Exception DomException

Constructors

NameDescription
DomException()Creates an exception with an empty message and the Error name.
DomException(string?)Creates an exception with the given message and the Error name.
DomException(string?, Exception?)Creates an exception with the given message, the Error name and the given inner exception.
DomException(string, string)Creates an exception with the given message and name.

DomException overloads

DomException()

DomException.cs

Creates an exception with an empty message and the Error name.

public DomException()

DomException(string?)

DomException.cs

Creates an exception with the given message and the Error name.

public DomException(string? message)

DomException(string?, Exception?)

DomException.cs

Creates an exception with the given message, the Error name and the given inner exception.

public DomException(string? message, Exception? innerException)
Parameters
message string?
innerException Exception?

DomException(string, string)

DomException.cs

Creates an exception with the given message and name.

public DomException(string message, string name)

Properties

NameDescription
CodeGets the legacy numeric error code associated with the name, or 0 when the name has no legacy code.
MessageGets the message describing the error.
NameGets the name of the error, such as NotFoundError.

Gets the legacy numeric error code associated with the name, or 0 when the name has no legacy code.

public ushort Code { get; }

Gets the message describing the error.

public override string Message { get; }

Gets the name of the error, such as NotFoundError.

public string Name { get; }

Constants

NameDescription
AbortErrThe legacy error code of AbortError: the operation was aborted.
DataCloneErrThe legacy error code of DataCloneError: the object cannot be cloned.
DomstringSizeErrThe legacy error code of DOMStringSizeError: the specified range of text does not fit in a string (legacy).
HierarchyRequestErrThe legacy error code of HierarchyRequestError: the operation would yield an incorrect node tree.
IndexSizeErrThe legacy error code of IndexSizeError: the index is not in the allowed range.
InuseAttributeErrThe legacy error code of InUseAttributeError: the attribute is already in use by another element.
InvalidAccessErrThe legacy error code of InvalidAccessError: the object does not support the operation or argument.
InvalidCharacterErrThe legacy error code of InvalidCharacterError: a string contains an invalid character.
InvalidModificationErrThe legacy error code of InvalidModificationError: the object cannot be modified in this way.
InvalidNodeTypeErrThe legacy error code of InvalidNodeTypeError: the supplied node is incorrect or has an incorrect ancestor for this operation.
InvalidStateErrThe legacy error code of InvalidStateError: the object is in an invalid state.
NamespaceErrThe legacy error code of NamespaceError: the operation is not allowed by the namespaces rules.
NetworkErrThe legacy error code of NetworkError: a network error occurred.
NoDataAllowedErrThe legacy error code of NoDataAllowedError: data is specified for a node that does not support data (legacy).
NoModificationAllowedErrThe legacy error code of NoModificationAllowedError: the object cannot be modified.
NotFoundErrThe legacy error code of NotFoundError: the object cannot be found here.
NotSupportedErrThe legacy error code of NotSupportedError: the operation is not supported.
QuotaExceededErrThe legacy error code of QuotaExceededError: the quota has been exceeded.
SecurityErrThe legacy error code of SecurityError: the operation is insecure.
SyntaxErrThe legacy error code of SyntaxError: the string does not match the expected pattern.
TimeoutErrThe legacy error code of TimeoutError: the operation timed out.
TypeMismatchErrThe legacy error code of TypeMismatchError: the type of the object does not match the expected type (legacy).
UrlMismatchErrThe legacy error code of URLMismatchError: the given URL does not match another URL.
ValidationErrThe legacy error code of ValidationError: a validation error occurred (legacy).
WrongDocumentErrThe legacy error code of WrongDocumentError: the object is in the wrong document.

AbortErr

The legacy error code of AbortError: the operation was aborted.

public const ushort AbortErr = 20

DataCloneErr

The legacy error code of DataCloneError: the object cannot be cloned.

public const ushort DataCloneErr = 25

DomstringSizeErr

The legacy error code of DOMStringSizeError: the specified range of text does not fit in a string (legacy).

public const ushort DomstringSizeErr = 2

HierarchyRequestErr

The legacy error code of HierarchyRequestError: the operation would yield an incorrect node tree.

public const ushort HierarchyRequestErr = 3

IndexSizeErr

The legacy error code of IndexSizeError: the index is not in the allowed range.

public const ushort IndexSizeErr = 1

InuseAttributeErr

The legacy error code of InUseAttributeError: the attribute is already in use by another element.

public const ushort InuseAttributeErr = 10

InvalidAccessErr

The legacy error code of InvalidAccessError: the object does not support the operation or argument.

public const ushort InvalidAccessErr = 15

InvalidCharacterErr

The legacy error code of InvalidCharacterError: a string contains an invalid character.

public const ushort InvalidCharacterErr = 5

InvalidModificationErr

The legacy error code of InvalidModificationError: the object cannot be modified in this way.

public const ushort InvalidModificationErr = 13

InvalidNodeTypeErr

The legacy error code of InvalidNodeTypeError: the supplied node is incorrect or has an incorrect ancestor for this operation.

public const ushort InvalidNodeTypeErr = 24

InvalidStateErr

The legacy error code of InvalidStateError: the object is in an invalid state.

public const ushort InvalidStateErr = 11

NamespaceErr

The legacy error code of NamespaceError: the operation is not allowed by the namespaces rules.

public const ushort NamespaceErr = 14

NetworkErr

The legacy error code of NetworkError: a network error occurred.

public const ushort NetworkErr = 19

NoDataAllowedErr

The legacy error code of NoDataAllowedError: data is specified for a node that does not support data (legacy).

public const ushort NoDataAllowedErr = 6

NoModificationAllowedErr

The legacy error code of NoModificationAllowedError: the object cannot be modified.

public const ushort NoModificationAllowedErr = 7

NotFoundErr

The legacy error code of NotFoundError: the object cannot be found here.

public const ushort NotFoundErr = 8

NotSupportedErr

The legacy error code of NotSupportedError: the operation is not supported.

public const ushort NotSupportedErr = 9

QuotaExceededErr

The legacy error code of QuotaExceededError: the quota has been exceeded.

public const ushort QuotaExceededErr = 22

SecurityErr

The legacy error code of SecurityError: the operation is insecure.

public const ushort SecurityErr = 18

SyntaxErr

The legacy error code of SyntaxError: the string does not match the expected pattern.

public const ushort SyntaxErr = 12

TimeoutErr

The legacy error code of TimeoutError: the operation timed out.

public const ushort TimeoutErr = 23

TypeMismatchErr

The legacy error code of TypeMismatchError: the type of the object does not match the expected type (legacy).

public const ushort TypeMismatchErr = 17

UrlMismatchErr

The legacy error code of URLMismatchError: the given URL does not match another URL.

public const ushort UrlMismatchErr = 21

ValidationErr

The legacy error code of ValidationError: a validation error occurred (legacy).

public const ushort ValidationErr = 16

WrongDocumentErr

The legacy error code of WrongDocumentError: the object is in the wrong document.

public const ushort WrongDocumentErr = 4