48 * method. The parser will then report all errors and warnings
49 * through this interface.</p>
50 *
51 * <p><strong>WARNING:</strong> If an application does <em>not</em>
52 * register an ErrorHandler, XML parsing errors will go unreported,
53 * except that <em>SAXParseException</em>s will be thrown for fatal errors.
54 * In order to detect validity errors, an ErrorHandler that does something
55 * with {@link #error error()} calls must be registered.</p>
56 *
57 * <p>For XML processing errors, a SAX driver must use this interface
58 * in preference to throwing an exception: it is up to the application
59 * to decide whether to throw an exception for different types of
60 * errors and warnings. Note, however, that there is no requirement that
61 * the parser continue to report additional errors after a call to
62 * {@link #fatalError fatalError}. In other words, a SAX driver class
63 * may throw an exception after reporting any fatalError.
64 * Also parsers may throw appropriate exceptions for non-XML errors.
65 * For example, {@link XMLReader#parse XMLReader.parse()} would throw
66 * an IOException for errors accessing entities or the document.</p>
67 *
68 * @since SAX 1.0
69 * @author David Megginson
70 * @see org.xml.sax.XMLReader#setErrorHandler
71 * @see org.xml.sax.SAXParseException
72 */
73 public interface ErrorHandler {
74
75
76 /**
77 * Receive notification of a warning.
78 *
79 * <p>SAX parsers will use this method to report conditions that
80 * are not errors or fatal errors as defined by the XML
81 * recommendation. The default behaviour is to take no
82 * action.</p>
83 *
84 * <p>The SAX parser must continue to provide normal parsing events
85 * after invoking this method: it should still be possible for the
86 * application to process the document through to the end.</p>
87 *
88 * <p>Filters may use this method to report other, non-XML warnings
|
48 * method. The parser will then report all errors and warnings
49 * through this interface.</p>
50 *
51 * <p><strong>WARNING:</strong> If an application does <em>not</em>
52 * register an ErrorHandler, XML parsing errors will go unreported,
53 * except that <em>SAXParseException</em>s will be thrown for fatal errors.
54 * In order to detect validity errors, an ErrorHandler that does something
55 * with {@link #error error()} calls must be registered.</p>
56 *
57 * <p>For XML processing errors, a SAX driver must use this interface
58 * in preference to throwing an exception: it is up to the application
59 * to decide whether to throw an exception for different types of
60 * errors and warnings. Note, however, that there is no requirement that
61 * the parser continue to report additional errors after a call to
62 * {@link #fatalError fatalError}. In other words, a SAX driver class
63 * may throw an exception after reporting any fatalError.
64 * Also parsers may throw appropriate exceptions for non-XML errors.
65 * For example, {@link XMLReader#parse XMLReader.parse()} would throw
66 * an IOException for errors accessing entities or the document.</p>
67 *
68 * @since 1.4, SAX 1.0
69 * @author David Megginson
70 * @see org.xml.sax.XMLReader#setErrorHandler
71 * @see org.xml.sax.SAXParseException
72 */
73 public interface ErrorHandler {
74
75
76 /**
77 * Receive notification of a warning.
78 *
79 * <p>SAX parsers will use this method to report conditions that
80 * are not errors or fatal errors as defined by the XML
81 * recommendation. The default behaviour is to take no
82 * action.</p>
83 *
84 * <p>The SAX parser must continue to provide normal parsing events
85 * after invoking this method: it should still be possible for the
86 * application to process the document through to the end.</p>
87 *
88 * <p>Filters may use this method to report other, non-XML warnings
|