Source for org.w3c.dom.DOMErrorHandler

   1: /*
   2:  * Copyright (c) 2004 World Wide Web Consortium,
   3:  *
   4:  * (Massachusetts Institute of Technology, European Research Consortium for
   5:  * Informatics and Mathematics, Keio University). All Rights Reserved. This
   6:  * work is distributed under the W3C(r) Software License [1] in the hope that
   7:  * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
   8:  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   9:  *
  10:  * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
  11:  */
  12: 
  13: package org.w3c.dom;
  14: 
  15: /**
  16:  *  <code>DOMErrorHandler</code> is a callback interface that the DOM
  17:  * implementation can call when reporting errors that happens while
  18:  * processing XML data, or when doing some other processing (e.g. validating
  19:  * a document). A <code>DOMErrorHandler</code> object can be attached to a
  20:  * <code>Document</code> using the "error-handler" on the
  21:  * <code>DOMConfiguration</code> interface. If more than one error needs to
  22:  * be reported during an operation, the sequence and numbers of the errors
  23:  * passed to the error handler are implementation dependent.
  24:  * <p> The application that is using the DOM implementation is expected to
  25:  * implement this interface.
  26:  * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
  27:  * @since DOM Level 3
  28:  */
  29: public interface DOMErrorHandler {
  30:     /**
  31:      * This method is called on the error handler when an error occurs.
  32:      * <br> If an exception is thrown from this method, it is considered to be
  33:      * equivalent of returning <code>true</code>.
  34:      * @param error  The error object that describes the error. This object
  35:      *   may be reused by the DOM implementation across multiple calls to
  36:      *   the <code>handleError</code> method.
  37:      * @return  If the <code>handleError</code> method returns
  38:      *   <code>false</code>, the DOM implementation should stop the current
  39:      *   processing when possible. If the method returns <code>true</code>,
  40:      *   the processing may continue depending on
  41:      *   <code>DOMError.severity</code>.
  42:      */
  43:     public boolean handleError(DOMError error);
  44: 
  45: }