src/javax/xml/transform/ErrorListener.java

Print this page
rev 602 : 8047723: @since tag cleanup in jaxp
Reviewed-by:


  32  * <code>Transformer</code> then reports all errors and warnings through this
  33  * interface.</p>
  34  *
  35  * <p>If an application does <em>not</em> register its own custom
  36  * <code>ErrorListener</code>, the default <code>ErrorListener</code>
  37  * is used which reports all warnings and errors to <code>System.err</code>
  38  * and does not throw any <code>Exception</code>s.
  39  * Applications are <em>strongly</em> encouraged to register and use
  40  * <code>ErrorListener</code>s that insure proper behavior for warnings and
  41  * errors.</p>
  42  *
  43  * <p>For transformation errors, a <code>Transformer</code> must use this
  44  * interface instead of throwing an <code>Exception</code>: it is up to the
  45  * application to decide whether to throw an <code>Exception</code> for
  46  * different types of errors and warnings.  Note however that the
  47  * <code>Transformer</code> is not required to continue with the transformation
  48  * after a call to {@link #fatalError(TransformerException exception)}.</p>
  49  *
  50  * <p><code>Transformer</code>s may use this mechanism to report XML parsing
  51  * errors as well as transformation errors.</p>


  52  */
  53 public interface ErrorListener {
  54 
  55     /**
  56      * Receive notification of a warning.
  57      *
  58      * <p>{@link javax.xml.transform.Transformer} can use this method to report
  59      * conditions that are not errors or fatal errors.  The default behaviour
  60      * is to take no action.</p>
  61      *
  62      * <p>After invoking this method, the Transformer must continue with
  63      * the transformation. It should still be possible for the
  64      * application to process the document through to the end.</p>
  65      *
  66      * @param exception The warning information encapsulated in a
  67      *                  transformer exception.
  68      *
  69      * @throws javax.xml.transform.TransformerException if the application
  70      * chooses to discontinue the transformation.
  71      *




  32  * <code>Transformer</code> then reports all errors and warnings through this
  33  * interface.</p>
  34  *
  35  * <p>If an application does <em>not</em> register its own custom
  36  * <code>ErrorListener</code>, the default <code>ErrorListener</code>
  37  * is used which reports all warnings and errors to <code>System.err</code>
  38  * and does not throw any <code>Exception</code>s.
  39  * Applications are <em>strongly</em> encouraged to register and use
  40  * <code>ErrorListener</code>s that insure proper behavior for warnings and
  41  * errors.</p>
  42  *
  43  * <p>For transformation errors, a <code>Transformer</code> must use this
  44  * interface instead of throwing an <code>Exception</code>: it is up to the
  45  * application to decide whether to throw an <code>Exception</code> for
  46  * different types of errors and warnings.  Note however that the
  47  * <code>Transformer</code> is not required to continue with the transformation
  48  * after a call to {@link #fatalError(TransformerException exception)}.</p>
  49  *
  50  * <p><code>Transformer</code>s may use this mechanism to report XML parsing
  51  * errors as well as transformation errors.</p>
  52  *
  53  * @since 1.4
  54  */
  55 public interface ErrorListener {
  56 
  57     /**
  58      * Receive notification of a warning.
  59      *
  60      * <p>{@link javax.xml.transform.Transformer} can use this method to report
  61      * conditions that are not errors or fatal errors.  The default behaviour
  62      * is to take no action.</p>
  63      *
  64      * <p>After invoking this method, the Transformer must continue with
  65      * the transformation. It should still be possible for the
  66      * application to process the document through to the end.</p>
  67      *
  68      * @param exception The warning information encapsulated in a
  69      *                  transformer exception.
  70      *
  71      * @throws javax.xml.transform.TransformerException if the application
  72      * chooses to discontinue the transformation.
  73      *