DomException Class
https://webidl.spec.whatwg.org/#idl-DOMException
public class DomException : Exception- Inheritance
ExceptionDomException
Constructors
| Name | Description |
|---|---|
| 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.csCreates an exception with an empty message and the Error name.
public DomException()DomException(string?)
DomException.csCreates an exception with the given message and the Error name.
public DomException(string? message)DomException(string?, Exception?)
DomException.csCreates an exception with the given message, the Error name and the given inner exception.
Parameters
messagestring?innerExceptionException?
DomException(string, string)
DomException.csCreates an exception with the given message and name.
Parameters
See also
Properties
| Name | Description |
|---|---|
| Code | Gets the legacy numeric error code associated with the name, or 0 when the name has no legacy code. |
| Message | Gets the message describing the error. |
| Name | Gets the name of the error, such as NotFoundError. |
Code
DomException.csGets the legacy numeric error code associated with the name, or 0 when the name has no legacy code.
public ushort Code { get; }Message
DomException.csGets the message describing the error.
public override string Message { get; }Name
DomException.csGets the name of the error, such as NotFoundError.
public string Name { get; }Constants
| Name | Description |
|---|---|
| AbortErr | The legacy error code of AbortError: the operation was aborted. |
| DataCloneErr | The legacy error code of DataCloneError: the object cannot be cloned. |
| DomstringSizeErr | The legacy error code of DOMStringSizeError: the specified range of text does not fit in a string (legacy). |
| HierarchyRequestErr | The legacy error code of HierarchyRequestError: the operation would yield an incorrect node tree. |
| IndexSizeErr | The legacy error code of IndexSizeError: the index is not in the allowed range. |
| InuseAttributeErr | The legacy error code of InUseAttributeError: the attribute is already in use by another element. |
| InvalidAccessErr | The legacy error code of InvalidAccessError: the object does not support the operation or argument. |
| InvalidCharacterErr | The legacy error code of InvalidCharacterError: a string contains an invalid character. |
| InvalidModificationErr | The legacy error code of InvalidModificationError: the object cannot be modified in this way. |
| InvalidNodeTypeErr | The legacy error code of InvalidNodeTypeError: the supplied node is incorrect or has an incorrect ancestor for this operation. |
| InvalidStateErr | The legacy error code of InvalidStateError: the object is in an invalid state. |
| NamespaceErr | The legacy error code of NamespaceError: the operation is not allowed by the namespaces rules. |
| NetworkErr | The legacy error code of NetworkError: a network error occurred. |
| NoDataAllowedErr | The legacy error code of NoDataAllowedError: data is specified for a node that does not support data (legacy). |
| NoModificationAllowedErr | The legacy error code of NoModificationAllowedError: the object cannot be modified. |
| NotFoundErr | The legacy error code of NotFoundError: the object cannot be found here. |
| NotSupportedErr | The legacy error code of NotSupportedError: the operation is not supported. |
| QuotaExceededErr | The legacy error code of QuotaExceededError: the quota has been exceeded. |
| SecurityErr | The legacy error code of SecurityError: the operation is insecure. |
| SyntaxErr | The legacy error code of SyntaxError: the string does not match the expected pattern. |
| TimeoutErr | The legacy error code of TimeoutError: the operation timed out. |
| TypeMismatchErr | The legacy error code of TypeMismatchError: the type of the object does not match the expected type (legacy). |
| UrlMismatchErr | The legacy error code of URLMismatchError: the given URL does not match another URL. |
| ValidationErr | The legacy error code of ValidationError: a validation error occurred (legacy). |
| WrongDocumentErr | The 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 = 20DataCloneErr
The legacy error code of DataCloneError: the object cannot be cloned.
public const ushort DataCloneErr = 25DomstringSizeErr
The legacy error code of DOMStringSizeError: the specified range of text does not fit in a string (legacy).
public const ushort DomstringSizeErr = 2HierarchyRequestErr
The legacy error code of HierarchyRequestError: the operation would yield an incorrect node tree.
public const ushort HierarchyRequestErr = 3IndexSizeErr
The legacy error code of IndexSizeError: the index is not in the allowed range.
public const ushort IndexSizeErr = 1InuseAttributeErr
The legacy error code of InUseAttributeError: the attribute is already in use by another element.
public const ushort InuseAttributeErr = 10InvalidAccessErr
The legacy error code of InvalidAccessError: the object does not support the operation or argument.
public const ushort InvalidAccessErr = 15InvalidCharacterErr
The legacy error code of InvalidCharacterError: a string contains an invalid character.
public const ushort InvalidCharacterErr = 5InvalidModificationErr
The legacy error code of InvalidModificationError: the object cannot be modified in this way.
public const ushort InvalidModificationErr = 13InvalidNodeTypeErr
The legacy error code of InvalidNodeTypeError: the supplied node is incorrect or has an incorrect ancestor for this operation.
public const ushort InvalidNodeTypeErr = 24InvalidStateErr
The legacy error code of InvalidStateError: the object is in an invalid state.
public const ushort InvalidStateErr = 11NamespaceErr
The legacy error code of NamespaceError: the operation is not allowed by the namespaces rules.
public const ushort NamespaceErr = 14NetworkErr
The legacy error code of NetworkError: a network error occurred.
public const ushort NetworkErr = 19NoDataAllowedErr
The legacy error code of NoDataAllowedError: data is specified for a node that does not support data (legacy).
public const ushort NoDataAllowedErr = 6NoModificationAllowedErr
The legacy error code of NoModificationAllowedError: the object cannot be modified.
public const ushort NoModificationAllowedErr = 7NotFoundErr
The legacy error code of NotFoundError: the object cannot be found here.
public const ushort NotFoundErr = 8NotSupportedErr
The legacy error code of NotSupportedError: the operation is not supported.
public const ushort NotSupportedErr = 9QuotaExceededErr
The legacy error code of QuotaExceededError: the quota has been exceeded.
public const ushort QuotaExceededErr = 22SecurityErr
The legacy error code of SecurityError: the operation is insecure.
public const ushort SecurityErr = 18SyntaxErr
The legacy error code of SyntaxError: the string does not match the expected pattern.
public const ushort SyntaxErr = 12TimeoutErr
The legacy error code of TimeoutError: the operation timed out.
public const ushort TimeoutErr = 23TypeMismatchErr
The legacy error code of TypeMismatchError: the type of the object does not match the expected type (legacy).
public const ushort TypeMismatchErr = 17UrlMismatchErr
The legacy error code of URLMismatchError: the given URL does not match another URL.
public const ushort UrlMismatchErr = 21ValidationErr
The legacy error code of ValidationError: a validation error occurred (legacy).
public const ushort ValidationErr = 16WrongDocumentErr
The legacy error code of WrongDocumentError: the object is in the wrong document.
public const ushort WrongDocumentErr = 4