Package org.htmlunit.javascript.host.dom
Class DOMException
- java.lang.Object
-
- org.htmlunit.corejs.javascript.ScriptableObject
-
- org.htmlunit.javascript.HtmlUnitScriptable
-
- org.htmlunit.javascript.host.dom.DOMException
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,org.htmlunit.corejs.javascript.ConstProperties,org.htmlunit.corejs.javascript.debug.DebuggableObject,org.htmlunit.corejs.javascript.Scriptable,org.htmlunit.corejs.javascript.SymbolScriptable
public class DOMException extends HtmlUnitScriptable
Exception for DOM manipulations.- See Also:
- DOM-Level-2-Core, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intABORT_ERRAbort error.private intcode_static intDATA_CLONE_ERRData clone error.static intDOMSTRING_SIZE_ERRIf the specified range of text does not fit into a DOMString.private java.lang.StringfileName_static intHIERARCHY_REQUEST_ERRIf any node is inserted somewhere it doesn't belong.static intINDEX_SIZE_ERRIf index or size is negative, or greater than the allowed value.static intINUSE_ATTRIBUTE_ERRIf an attempt is made to add an attribute that is already in use elsewhere.static intINVALID_ACCESS_ERRIf a parameter or an operation is not supported by the underlying object.static intINVALID_CHARACTER_ERRIf an invalid or illegal character is specified, such as in a name.static intINVALID_MODIFICATION_ERRIf an attempt is made to modify the type of the underlying object.static intINVALID_NODE_TYPE_ERRInvalid node type error.static intINVALID_STATE_ERRIf an attempt is made to use an object that is not, or is no longer, usable.private intlineNumber_private java.lang.Stringmessage_static intNAMESPACE_ERRIf an attempt is made to create or change an object in a way which is incorrect with regard to namespaces.static intNETWORK_ERRNetwork error.static intNO_DATA_ALLOWED_ERRIf data is specified for a node which does not support data.static intNO_MODIFICATION_ALLOWED_ERRIf an attempt is made to modify an object where modifications are not allowed.static intNOT_FOUND_ERRIf an attempt is made to reference a node in a context where it does not exist.static intNOT_SUPPORTED_ERRIf the implementation does not support the requested type of object or operation.static intQUOTA_EXCEEDED_ERRQuota exceeded error.static intSECURITY_ERRSecurity error.static intSYNTAX_ERRIf an invalid or illegal string is specified.static intTIMEOUT_ERRTimeout error.static intTYPE_MISMATCH_ERRIf the type of an object is incompatible with the expected type of the parameter.static intURL_MISMATCH_ERRURL mismatch error.static intVALIDATION_ERRIf a call to a method would make theNodeinvalid with respect to "partial validity".static intWRONG_DOCUMENT_ERRIf a node is used in a different document than the one that created it (that doesn't support it).
-
Constructor Summary
Constructors Constructor Description DOMException()Default constructor used to build the prototype.DOMException(java.lang.String message, int errorCode)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetCode()Gets the exception code.java.lang.ObjectgetFilename()Gets the name of the in which the exception occurred.java.lang.ObjectgetLineNumber()Gets the line at which the exception occurred.java.lang.ObjectgetMessage()Gets the exception message.voidjsConstructor()JavaScript constructor.voidsetLocation(java.lang.String fileName, int lineNumber)Sets the location in JavaScript source where this exception occurred.-
Methods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, put, setClassName, setDomNode, setDomNode, setParentScope, setupPromise, setupRejectedPromise
-
Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
-
-
-
-
Field Detail
-
DOMSTRING_SIZE_ERR
public static final int DOMSTRING_SIZE_ERR
If the specified range of text does not fit into a DOMString.- See Also:
- Constant Field Values
-
HIERARCHY_REQUEST_ERR
public static final int HIERARCHY_REQUEST_ERR
If any node is inserted somewhere it doesn't belong.- See Also:
- Constant Field Values
-
INDEX_SIZE_ERR
public static final int INDEX_SIZE_ERR
If index or size is negative, or greater than the allowed value.- See Also:
- Constant Field Values
-
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.- See Also:
- Constant Field Values
-
INVALID_ACCESS_ERR
public static final int INVALID_ACCESS_ERR
If a parameter or an operation is not supported by the underlying object.- See Also:
- Constant Field Values
-
INVALID_CHARACTER_ERR
public static final int INVALID_CHARACTER_ERR
If an invalid or illegal character is specified, such as in a name.- See Also:
- Constant Field Values
-
INVALID_MODIFICATION_ERR
public static final int INVALID_MODIFICATION_ERR
If an attempt is made to modify the type of the underlying object.- See Also:
- Constant Field Values
-
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.- See Also:
- Constant Field Values
-
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.- See Also:
- Constant Field Values
-
NO_DATA_ALLOWED_ERR
public static final int NO_DATA_ALLOWED_ERR
If data is specified for a node which does not support data.- See Also:
- Constant Field Values
-
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.- See Also:
- Constant Field Values
-
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.- See Also:
- Constant Field Values
-
NOT_SUPPORTED_ERR
public static final int NOT_SUPPORTED_ERR
If the implementation does not support the requested type of object or operation.- See Also:
- Constant Field Values
-
SYNTAX_ERR
public static final int SYNTAX_ERR
If an invalid or illegal string is specified.- See Also:
- Constant Field Values
-
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).- See Also:
- Constant Field Values
-
VALIDATION_ERR
public static final int VALIDATION_ERR
If a call to a method would make theNodeinvalid with respect to "partial validity".- See Also:
- Constant Field Values
-
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.- See Also:
- Constant Field Values
-
SECURITY_ERR
public static final int SECURITY_ERR
Security error.- See Also:
- Constant Field Values
-
NETWORK_ERR
public static final int NETWORK_ERR
Network error.- See Also:
- Constant Field Values
-
ABORT_ERR
public static final int ABORT_ERR
Abort error.- See Also:
- Constant Field Values
-
URL_MISMATCH_ERR
public static final int URL_MISMATCH_ERR
URL mismatch error.- See Also:
- Constant Field Values
-
QUOTA_EXCEEDED_ERR
public static final int QUOTA_EXCEEDED_ERR
Quota exceeded error.- See Also:
- Constant Field Values
-
TIMEOUT_ERR
public static final int TIMEOUT_ERR
Timeout error.- See Also:
- Constant Field Values
-
INVALID_NODE_TYPE_ERR
public static final int INVALID_NODE_TYPE_ERR
Invalid node type error.- See Also:
- Constant Field Values
-
DATA_CLONE_ERR
public static final int DATA_CLONE_ERR
Data clone error.- See Also:
- Constant Field Values
-
code_
private final int code_
-
message_
private final java.lang.String message_
-
lineNumber_
private int lineNumber_
-
fileName_
private java.lang.String fileName_
-
-
Method Detail
-
jsConstructor
public void jsConstructor()
JavaScript constructor.
-
getCode
public java.lang.Object getCode()
Gets the exception code.- Returns:
- the exception code
-
getMessage
public java.lang.Object getMessage()
Gets the exception message.- Returns:
- the exception message
-
getLineNumber
public java.lang.Object getLineNumber()
Gets the line at which the exception occurred.- Returns:
- the line of the exception
-
getFilename
public java.lang.Object getFilename()
Gets the name of the in which the exception occurred.- Returns:
- the name of the source file
-
setLocation
public void setLocation(java.lang.String fileName, int lineNumber)Sets the location in JavaScript source where this exception occurred.- Parameters:
fileName- the name of the source filelineNumber- the line number
-
-