< prev index next >

src/java.xml/share/classes/org/w3c/dom/ls/LSException.java

Print this page




  41 
  42 package org.w3c.dom.ls;
  43 
  44 /**
  45  *  Parser or write operations may throw an <code>LSException</code> if the
  46  * processing is stopped. The processing can be stopped due to a
  47  * <code>DOMError</code> with a severity of
  48  * <code>DOMError.SEVERITY_FATAL_ERROR</code> or a non recovered
  49  * <code>DOMError.SEVERITY_ERROR</code>, or if
  50  * <code>DOMErrorHandler.handleError()</code> returned <code>false</code>.
  51  * <p ><b>Note:</b>  As suggested in the definition of the constants in the
  52  * <code>DOMError</code> interface, a DOM implementation may choose to
  53  * continue after a fatal error, but the resulting DOM tree is then
  54  * implementation dependent.
  55  * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
  56 and Save Specification</a>.
  57  *
  58  * @since 1.5
  59  */
  60 public class LSException extends RuntimeException {


  61     public LSException(short code, String message) {
  62        super(message);
  63        this.code = code;
  64     }
  65     public short   code;
  66     // LSExceptionCode
  67     /**
  68      *  If an attempt was made to load a document, or an XML Fragment, using
  69      * <code>LSParser</code> and the processing has been stopped.
  70      */
  71     public static final short PARSE_ERR                 = 81;
  72     /**
  73      *  If an attempt was made to serialize a <code>Node</code> using
  74      * <code>LSSerializer</code> and the processing has been stopped.
  75      */
  76     public static final short SERIALIZE_ERR             = 82;
  77 
  78 }


  41 
  42 package org.w3c.dom.ls;
  43 
  44 /**
  45  *  Parser or write operations may throw an <code>LSException</code> if the
  46  * processing is stopped. The processing can be stopped due to a
  47  * <code>DOMError</code> with a severity of
  48  * <code>DOMError.SEVERITY_FATAL_ERROR</code> or a non recovered
  49  * <code>DOMError.SEVERITY_ERROR</code>, or if
  50  * <code>DOMErrorHandler.handleError()</code> returned <code>false</code>.
  51  * <p ><b>Note:</b>  As suggested in the definition of the constants in the
  52  * <code>DOMError</code> interface, a DOM implementation may choose to
  53  * continue after a fatal error, but the resulting DOM tree is then
  54  * implementation dependent.
  55  * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
  56 and Save Specification</a>.
  57  *
  58  * @since 1.5
  59  */
  60 public class LSException extends RuntimeException {
  61     private static final long serialVersionUID = 5371691160978884690L;
  62     
  63     public LSException(short code, String message) {
  64        super(message);
  65        this.code = code;
  66     }
  67     public short   code;
  68     // LSExceptionCode
  69     /**
  70      *  If an attempt was made to load a document, or an XML Fragment, using
  71      * <code>LSParser</code> and the processing has been stopped.
  72      */
  73     public static final short PARSE_ERR                 = 81;
  74     /**
  75      *  If an attempt was made to serialize a <code>Node</code> using
  76      * <code>LSSerializer</code> and the processing has been stopped.
  77      */
  78     public static final short SERIALIZE_ERR             = 82;
  79 
  80 }
< prev index next >