com.gargoylesoftware.htmlunit.javascript.host
Class DOMException

java.lang.Object
  extended by net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.DOMException
All Implemented Interfaces:
Serializable, Cloneable, Map, net.sourceforge.htmlunit.corejs.javascript.ConstProperties, net.sourceforge.htmlunit.corejs.javascript.debug.DebuggableObject, net.sourceforge.htmlunit.corejs.javascript.Scriptable

public class DOMException
extends SimpleScriptable

Exception for DOM manipulations.

Version:
$Revision: 5527 $
Author:
Marc Guillemot
See Also:
DOM-Level-2-Core, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
static short DOMSTRING_SIZE_ERR
          If the specified range of text does not fit into a DOMString.
static short HIERARCHY_REQUEST_ERR
          If any node is inserted somewhere it doesn't belong.
static short INDEX_SIZE_ERR
          If index or size is negative, or greater than the allowed value.
static short INUSE_ATTRIBUTE_ERR
          If an attempt is made to add an attribute that is already in use elsewhere.
static short INVALID_ACCESS_ERR
          If a parameter or an operation is not supported by the underlying object.
static short INVALID_CHARACTER_ERR
          If an invalid or illegal character is specified, such as in a name.
static short INVALID_MODIFICATION_ERR
          If an attempt is made to modify the type of the underlying object.
static short INVALID_STATE_ERR
          If an attempt is made to use an object that is not, or is no longer, usable.
static short NAMESPACE_ERR
          If an attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
static short NO_DATA_ALLOWED_ERR
          If data is specified for a node which does not support data.
static short NO_MODIFICATION_ALLOWED_ERR
          If an attempt is made to modify an object where modifications are not allowed.
static short NOT_FOUND_ERR
          If an attempt is made to reference a node in a context where it does not exist.
static short NOT_SUPPORTED_ERR
          If the implementation does not support the requested type of object or operation.
static short SYNTAX_ERR
          If an invalid or illegal string is specified.
static short WRONG_DOCUMENT_ERR
          If a node is used in a different document than the one that created it (that doesn't support it).
 
Fields inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
DOMException()
          Default constructor used to build the prototype.
DOMException(String message, short errorCode)
          Constructor.
 
Method Summary
 Object jsxGet_code()
          Gets the exception code.
 Object jsxGet_filename()
          Gets the name of the in which the exception occurred.
 Object jsxGet_lineNumber()
          Gets the line at which the exception occurred.
 Object jsxGet_message()
          Gets the exception message.
 void setLocation(String fileName, int lineNumber)
          Sets the location in JavaScript source where this exception occurred.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, makeScriptableFor, setCaseSensitive, setDomNode, setDomNode, setHtmlElement
 
Methods inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, clear, containsKey, containsValue, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, entrySet, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, keySet, preventExtensions, put, put, put, putAll, putConst, putConstProperty, putProperty, putProperty, redefineProperty, remove, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype, size, values
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

DOMSTRING_SIZE_ERR

public static final short 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 short HIERARCHY_REQUEST_ERR
If any node is inserted somewhere it doesn't belong.

See Also:
Constant Field Values

INDEX_SIZE_ERR

public static final short 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 short 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 short 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 short 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 short 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 short 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 short 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 short 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 short 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 short 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 short 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 short SYNTAX_ERR
If an invalid or illegal string is specified.

See Also:
Constant Field Values

WRONG_DOCUMENT_ERR

public static final short 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
Constructor Detail

DOMException

public DOMException()
Default constructor used to build the prototype.


DOMException

public DOMException(String message,
                    short errorCode)
Constructor.

Parameters:
message - the exception message
errorCode - the error code
Method Detail

jsxGet_code

public Object jsxGet_code()
Gets the exception code.

Returns:
the exception code

jsxGet_message

public Object jsxGet_message()
Gets the exception message.

Returns:
the exception message

jsxGet_lineNumber

public Object jsxGet_lineNumber()
Gets the line at which the exception occurred.

Returns:
the line of the exception

jsxGet_filename

public Object jsxGet_filename()
Gets the name of the in which the exception occurred.

Returns:
the name of the source file

setLocation

public void setLocation(String fileName,
                        int lineNumber)
Sets the location in JavaScript source where this exception occurred.

Parameters:
fileName - the name of the source file
lineNumber - the line number


Copyright © 2002-2011 Gargoyle Software Inc.. All Rights Reserved.