KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thaiopensource > xml > sax > DraconianErrorHandler


1 package com.thaiopensource.xml.sax;
2
3 import org.xml.sax.ErrorHandler JavaDoc;
4 import org.xml.sax.SAXParseException JavaDoc;
5 import org.xml.sax.SAXException JavaDoc;
6
7 /**
8  * An <code>ErrorHandler</code> implementing a brutal error handling policy.
9  * Fatal errors and errors are handled by throwing the exception.
10  * Warnings are ignored.
11  *
12  * @author <a HREF="mailto:jjc@jclark.com">James Clark</a>
13  */

14 public class DraconianErrorHandler implements ErrorHandler JavaDoc {
15   public void warning(SAXParseException JavaDoc e) throws SAXException JavaDoc {
16   }
17
18   public void error(SAXParseException JavaDoc e) throws SAXException JavaDoc {
19     throw e;
20   }
21
22   public void fatalError(SAXParseException JavaDoc e) throws SAXException JavaDoc {
23     throw e;
24   }
25 }
26
Popular Tags