Class DOMException
Namespace: Aspose.Html.Dom
Assembly: Aspose.HTML.dll (25.2.0)
The DOMException interface represents an abnormal event (called an exception) which 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.
[ComVisible(true)]
[DOMObject]
[DOMName("DOMException")]
public class DOMException : PlatformException, ISerializable
Inheritance
object ← Exception ← PlatformException ← DOMException
Implements
Inherited Members
Exception.GetBaseException(), Exception.ToString(), Exception.GetType(), Exception.TargetSite, Exception.Message, Exception.Data, Exception.InnerException, Exception.HelpLink, Exception.Source, Exception.HResult, Exception.StackTrace, Exception.SerializeObjectState, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
DOMException(string)
Initializes a new instance of the Aspose.Html.Dom.DOMException class.
[DOMConstructor]
public DOMException(string message)
Parameters
message
string
The error message.
DOMException(string, string)
Initializes a new instance of the Aspose.Html.Dom.DOMException class.
[DOMConstructor]
public DOMException(string name, string message)
Parameters
name
string
The error name.
message
string
The error message.
Fields
ABORT_ERR
The operation was aborted.
[DOMName("ABORT_ERR")]
public const ushort ABORT_ERR = 20
Field Value
DATA_CLONE_ERR
The object can not be cloned.
[DOMName("DATA_CLONE_ERR")]
public const ushort DATA_CLONE_ERR = 25
Field Value
DOMSTRING_SIZE_ERR
If the specified range of text does not fit into a DOMString.
[DOMName("DOMSTRING_SIZE_ERR")]
public const ushort DOMSTRING_SIZE_ERR = 2
Field Value
HIERARCHY_REQUEST_ERR
If any Node is inserted somewhere it doesn’t belong.
[DOMName("HIERARCHY_REQUEST_ERR")]
public const ushort HIERARCHY_REQUEST_ERR = 3
Field Value
INDEX_SIZE_ERR
If index or size is negative, or greater than the allowed value.
[DOMName("INDEX_SIZE_ERR")]
public const ushort INDEX_SIZE_ERR = 1
Field Value
INUSE_ATTRIBUTE_ERR
If an attempt is made to add an attribute that is already in use elsewhere.
[DOMName("INUSE_ATTRIBUTE_ERR")]
public const ushort INUSE_ATTRIBUTE_ERR = 10
Field Value
INVALID_ACCESS_ERR
If a parameter or an operation is not supported by the underlying object.
[DOMName("INVALID_ACCESS_ERR")]
public const ushort INVALID_ACCESS_ERR = 15
Field Value
INVALID_CHARACTER_ERR
If an invalid or illegal character is specified, such as in an XML name.
[DOMName("INVALID_CHARACTER_ERR")]
public const ushort INVALID_CHARACTER_ERR = 5
Field Value
INVALID_EXPRESSION_ERR
The expression has a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator or contains specialized extension functions or variables not supported by this implementation.
[DOMName("INVALID_EXPRESSION_ERR")]
public const ushort INVALID_EXPRESSION_ERR = 51
Field Value
INVALID_MODIFICATION_ERR
If an attempt is made to modify the type of the underlying object.
[DOMName("INVALID_MODIFICATION_ERR")]
public const ushort INVALID_MODIFICATION_ERR = 13
Field Value
INVALID_NODE_TYPE_ERR
The supplied node is incorrect or has an incorrect ancestor for this operation.
[DOMName("INVALID_NODE_TYPE_ERR")]
public const ushort INVALID_NODE_TYPE_ERR = 24
Field Value
INVALID_STATE_ERR
If an attempt is made to use an object that is not, or is no longer, usable.
[DOMName("INVALID_STATE_ERR")]
public const ushort INVALID_STATE_ERR = 11
Field Value
NAMESPACE_ERR
If an attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
[DOMName("NAMESPACE_ERR")]
public const ushort NAMESPACE_ERR = 14
Field Value
NETWORK_ERR
A network error occurred.
[DOMName("NETWORK_ERR")]
public const ushort NETWORK_ERR = 19
Field Value
NOT_FOUND_ERR
If an attempt is made to reference a Node in a context where it does not exist.
[DOMName("NOT_FOUND_ERR")]
public const ushort NOT_FOUND_ERR = 8
Field Value
NOT_SUPPORTED_ERR
If the implementation does not support the requested type of object or operation.
[DOMName("NOT_SUPPORTED_ERR")]
public const ushort NOT_SUPPORTED_ERR = 9
Field Value
NO_DATA_ALLOWED_ERR
If data is specified for a Node which does not support data.
[DOMName("NO_DATA_ALLOWED_ERR")]
public const ushort NO_DATA_ALLOWED_ERR = 6
Field Value
NO_MODIFICATION_ALLOWED_ERR
If an attempt is made to modify an object where modifications are not allowed.
[DOMName("NO_MODIFICATION_ALLOWED_ERR")]
public const ushort NO_MODIFICATION_ALLOWED_ERR = 7
Field Value
QUOTA_EXCEEDED_ERR
The quota has been exceeded.
[DOMName("QUOTA_EXCEEDED_ERR")]
public const ushort QUOTA_EXCEEDED_ERR = 22
Field Value
SECURITY_ERR
The operation is insecure.
[DOMName("SECURITY_ERR")]
public const ushort SECURITY_ERR = 18
Field Value
SYNTAX_ERR
If an invalid or illegal string is specified.
[DOMName("SYNTAX_ERR")]
public const ushort SYNTAX_ERR = 12
Field Value
TIMEOUT_ERR
The operation timed out.
[DOMName("TIMEOUT_ERR")]
public const ushort TIMEOUT_ERR = 23
Field Value
TYPE_ERR
The expression cannot be converted to return the specified type.
[DOMName("TYPE_ERR")]
public const ushort TYPE_ERR = 52
Field Value
TYPE_MISMATCH_ERR
If the type of an object is incompatible with the expected type of the parameter associated to the object.
[DOMName("TYPE_MISMATCH_ERR")]
public const ushort TYPE_MISMATCH_ERR = 17
Field Value
URL_MISMATCH_ERR
The given URL does not match another URL.
[DOMName("URL_MISMATCH_ERR")]
public const ushort URL_MISMATCH_ERR = 21
Field Value
VALIDATION_ERR
If a call to a method such as insertBefore or removeChild would make the Node invalid with respect to “partial validity”, this exception would be raised and the operation would not be done. This code is used in [DOM Level 3 Validation]. Refer to this specification for further information.
[DOMName("VALIDATION_ERR")]
public const ushort VALIDATION_ERR = 16
Field Value
WRONG_DOCUMENT_ERR
If a Node is used in a different document than the one that created it (that doesn’t support it).
[DOMName("WRONG_DOCUMENT_ERR")]
public const ushort WRONG_DOCUMENT_ERR = 4
Field Value
Properties
Code
Returns a value that contains one of the error code constants, or 0 if none match. This field is used for historical reasons.
[DOMName("code")]
public ushort Code { get; }
Property Value
Message
Returns a string representing a message or description associated with the given error name.
[DOMName("message")]
public override string Message { get; }
Property Value
Name
Returns a string that contains one of the strings associated with an error name.
[DOMName("name")]
public string Name { get; }