@DOMObjectAttribute @DOMNameAttribute(name="DOMException") public class DOMException extends com.aspose.html.HTMLException
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.
Modifier and Type | Field and Description |
---|---|
static int |
ABORT_ERR
The operation was aborted.
|
static int |
DATA_CLONE_ERR
The object can not be cloned.
|
static int |
DOMSTRING_SIZE_ERR
If the specified range of text does not fit into a DOMString.
|
static int |
HIERARCHY_REQUEST_ERR
If any Node is inserted somewhere it doesn't belong.
|
static int |
INDEX_SIZE_ERR
If index or size is negative, or greater than the allowed value.
|
static int |
INUSE_ATTRIBUTE_ERR
If an attempt is made to add an attribute that is already in use elsewhere.
|
static int |
INVALID_ACCESS_ERR
If a parameter or an operation is not supported by the underlying object.
|
static int |
INVALID_CHARACTER_ERR
If an invalid or illegal character is specified, such as in an XML name.
|
static int |
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.
|
static int |
INVALID_MODIFICATION_ERR
If an attempt is made to modify the type of the underlying object.
|
static int |
INVALID_NODE_TYPE_ERR
The supplied node is incorrect or has an incorrect ancestor for this operation.
|
static int |
INVALID_STATE_ERR
If an attempt is made to use an object that is not, or is no longer, usable.
|
static int |
NAMESPACE_ERR
If an attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
|
static int |
NETWORK_ERR
A network error occurred.
|
static int |
NO_DATA_ALLOWED_ERR
If data is specified for a Node which does not support data.
|
static int |
NO_MODIFICATION_ALLOWED_ERR
If an attempt is made to modify an object where modifications are not allowed.
|
static int |
NOT_FOUND_ERR
If an attempt is made to reference a Node in a context where it does not exist.
|
static int |
NOT_SUPPORTED_ERR
If the implementation does not support the requested type of object or operation.
|
static int |
QUOTA_EXCEEDED_ERR
The quota has been exceeded.
|
static int |
SECURITY_ERR
The operation is insecure.
|
static int |
SYNTAX_ERR
If an invalid or illegal string is specified.
|
static int |
TIMEOUT_ERR
The operation timed out.
|
static int |
TYPE_ERR
The expression cannot be converted to return the specified type.
|
static int |
TYPE_MISMATCH_ERR
If the type of an object is incompatible with the expected type of the parameter associated to the object.
|
static int |
URL_MISMATCH_ERR
The given URL does not match another URL.
|
static int |
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.
|
static int |
WRONG_DOCUMENT_ERR
If a Node is used in a different document than the one that created it (that doesn't support it).
|
Constructor and Description |
---|
DOMException(int code,
java.lang.String name,
java.lang.String message)
Initializes a new instance of the
DOMException class. |
DOMException(int code,
java.lang.String name,
java.lang.String message,
java.lang.RuntimeException innerException)
Initializes a new instance of the
DOMException class. |
DOMException(java.lang.String message)
Initializes a new instance of the
DOMException class. |
DOMException(java.lang.String name,
java.lang.String message)
Initializes a new instance of the
DOMException class. |
Modifier and Type | Method and Description |
---|---|
long |
getCode()
Returns a value that contains one of the error code constants, or 0 if none match.
|
java.lang.String |
getMessage()
Returns a string representing a message or description associated with the given error name.
|
java.lang.String |
getName()
Returns a string that contains one of the strings associated with an error name.
|
getHResult, getInnerException, getType, setErrorCode, setHResult, toString
@DOMNameAttribute(name="INDEX_SIZE_ERR") public static final int INDEX_SIZE_ERR
If index or size is negative, or greater than the allowed value.
@DOMNameAttribute(name="DOMSTRING_SIZE_ERR") public static final int DOMSTRING_SIZE_ERR
If the specified range of text does not fit into a DOMString.
@DOMNameAttribute(name="HIERARCHY_REQUEST_ERR") public static final int HIERARCHY_REQUEST_ERR
If any Node is inserted somewhere it doesn't belong.
@DOMNameAttribute(name="WRONG_DOCUMENT_ERR") public static final int WRONG_DOCUMENT_ERR
If a Node is used in a different document than the one that created it (that doesn't support it).
@DOMNameAttribute(name="INVALID_CHARACTER_ERR") public static final int INVALID_CHARACTER_ERR
If an invalid or illegal character is specified, such as in an XML name.
@DOMNameAttribute(name="NO_DATA_ALLOWED_ERR") public static final int NO_DATA_ALLOWED_ERR
If data is specified for a Node which does not support data.
@DOMNameAttribute(name="NO_MODIFICATION_ALLOWED_ERR") public static final int NO_MODIFICATION_ALLOWED_ERR
If an attempt is made to modify an object where modifications are not allowed.
@DOMNameAttribute(name="NOT_FOUND_ERR") public static final int NOT_FOUND_ERR
If an attempt is made to reference a Node in a context where it does not exist.
@DOMNameAttribute(name="NOT_SUPPORTED_ERR") public static final int NOT_SUPPORTED_ERR
If the implementation does not support the requested type of object or operation.
@DOMNameAttribute(name="INUSE_ATTRIBUTE_ERR") public static final int INUSE_ATTRIBUTE_ERR
If an attempt is made to add an attribute that is already in use elsewhere.
@DOMNameAttribute(name="INVALID_STATE_ERR") public static final int INVALID_STATE_ERR
If an attempt is made to use an object that is not, or is no longer, usable.
@DOMNameAttribute(name="SYNTAX_ERR") public static final int SYNTAX_ERR
If an invalid or illegal string is specified.
@DOMNameAttribute(name="INVALID_MODIFICATION_ERR") public static final int INVALID_MODIFICATION_ERR
If an attempt is made to modify the type of the underlying object.
@DOMNameAttribute(name="NAMESPACE_ERR") public static final int NAMESPACE_ERR
If an attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
@DOMNameAttribute(name="INVALID_ACCESS_ERR") public static final int INVALID_ACCESS_ERR
If a parameter or an operation is not supported by the underlying object.
@DOMNameAttribute(name="VALIDATION_ERR") public static final int 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.
@DOMNameAttribute(name="TYPE_MISMATCH_ERR") public static final int TYPE_MISMATCH_ERR
If the type of an object is incompatible with the expected type of the parameter associated to the object.
@DOMNameAttribute(name="SECURITY_ERR") public static final int SECURITY_ERR
The operation is insecure.
@DOMNameAttribute(name="NETWORK_ERR") public static final int NETWORK_ERR
A network error occurred.
@DOMNameAttribute(name="ABORT_ERR") public static final int ABORT_ERR
The operation was aborted.
@DOMNameAttribute(name="URL_MISMATCH_ERR") public static final int URL_MISMATCH_ERR
The given URL does not match another URL.
@DOMNameAttribute(name="QUOTA_EXCEEDED_ERR") public static final int QUOTA_EXCEEDED_ERR
The quota has been exceeded.
@DOMNameAttribute(name="TIMEOUT_ERR") public static final int TIMEOUT_ERR
The operation timed out.
@DOMNameAttribute(name="INVALID_NODE_TYPE_ERR") public static final int INVALID_NODE_TYPE_ERR
The supplied node is incorrect or has an incorrect ancestor for this operation.
@DOMNameAttribute(name="DATA_CLONE_ERR") public static final int DATA_CLONE_ERR
The object can not be cloned.
@DOMNameAttribute(name="INVALID_EXPRESSION_ERR") public static final int 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.
@DOMNameAttribute(name="TYPE_ERR") public static final int TYPE_ERR
The expression cannot be converted to return the specified type.
public DOMException(java.lang.String message)
Initializes a new instance of the DOMException
class.
message
- The error message.public DOMException(java.lang.String name, java.lang.String message)
Initializes a new instance of the DOMException
class.
name
- The error name.message
- The error message.public DOMException(int code, java.lang.String name, java.lang.String message)
Initializes a new instance of the DOMException
class.
code
- The error code.name
- The error name.message
- The error message.public DOMException(int code, java.lang.String name, java.lang.String message, java.lang.RuntimeException innerException)
Initializes a new instance of the DOMException
class.
code
- The error code.name
- The error name.message
- The error message.innerException
- The inner exception.@DOMNameAttribute(name="code") public long getCode()
Returns a value that contains one of the error code constants, or 0 if none match. This field is used for historical reasons.
Value: Returns the error code.@DOMNameAttribute(name="name") public java.lang.String getName()
Returns a string that contains one of the strings associated with an error name.
Value: The error name.@DOMNameAttribute(name="message") public java.lang.String getMessage()
Returns a string representing a message or description associated with the given error name.
Value: The error message.getMessage
in class java.lang.Throwable