DOMException


DOMException org.w3c.dom

Java 1.4 serializable unchecked

An instance of this class is thrown whenever an exception is raised by the DOM API. Unlike many Java APIs, the DOM API does not define specialized subclasses to define different categories of exceptions. Instead, a more specific exception type is specified by the public field code . The value of this field will be one of the constants defined by this class, which have the following meanings:


INDEX_SIZE_ERR

Indicates an out-of-bounds error for an array or string index.


DOMSTRING_SIZE_ERR

Indicates that a requested text is too big to fit into a String object. Exceptions of this type are intended for DOM implementations for other languages and should not occur in Java.


HIERARCHY_REQUEST_ERR

Indicates that an attempt was made to place a node somewhere illegal in the document tree hierarchy.


WRONG_DOCUMENT_ERR

Indicates an attempt to use a node with a document that is different than the document that created the node.


INVALID_CHARACTER_ERR

Indicates that an illegal character is used (in an element name , for example) .


NO_DATA_ALLOWED_ERR

Not currently used.


NO_MODIFICATION_ALLOWED_ERR

Indicates that an attempt was made to modify a node that is read-only and does not allow modifications. Entity, EntityReference, and Notation nodes, and all of their descendants are read-only.


NOT_FOUND_ERR

Indicates that a node was not found where it was expected.


NOT_SUPPORTED_ERR

Indicates that a method or property is not supported in the current DOM implementation.


INUSE_ATTRIBUTE_ERR

Indicates that an attempt was made to associate an Attr with an Element when that Attr node was already associated with a different Element node.


INVALID_STATE_ERR

Indicates an attempt to use an object that is not yet, or is no longer, in a state that allows such use.


SYNTAX_ERR

Indicates that a specified string contains a syntax error. Exceptions of this type are not raised by the core module of the DOM API described here.


INVALID_MODIFICATION_ERR

Exceptions of this type are not raised by the core module of the DOM API described here.


NAMESPACE_ERR

Indicates an error involving element or attribute namespaces.


INVALID_ACCESS_ERR

Indicates an attempt to access an object in a way that is not supported by the implementation.

Figure 21-8. org.w3c.dom.DOMException

 public class  DOMException  extends RuntimeException {  // Public Constructors  public  DOMException  (short  code  , String  message  );  // Public Constants  public static final short  DOMSTRING_SIZE_ERR  ;  =2  public static final short  HIERARCHY_REQUEST_ERR  ;  =3  public static final short  INDEX_SIZE_ERR  ;  =1  public static final short  INUSE_ATTRIBUTE_ERR  ;  =10  public static final short  INVALID_ACCESS_ERR  ;  =15  public static final short  INVALID_CHARACTER_ERR  ;  =5  public static final short  INVALID_MODIFICATION_ERR  ;  =13  public static final short  INVALID_STATE_ERR  ;  =11  public static final short  NAMESPACE_ERR  ;  =14  public static final short  NO_DATA_ALLOWED_ERR  ;  =6  public static final short  NO_MODIFICATION_ALLOWED_ERR  ;  =7  public static final short  NOT_FOUND_ERR  ;  =8  public static final short  NOT_SUPPORTED_ERR  ;  =9  public static final short  SYNTAX_ERR  ;  =12   5.0  public static final short  TYPE_MISMATCH_ERR  ;  =17   5.0  public static final short  VALIDATION_ERR  ;  =16  public static final short  WRONG_DOCUMENT_ERR  ;  =4   // Public Instance Fields  public short  code  ;   } 

Thrown By

Too many methods to list.



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net