1 package com.thaiopensource.xml.sax;2 3 import org.xml.sax.ErrorHandler ;4 import org.xml.sax.SAXParseException ;5 import org.xml.sax.SAXException ;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 {15 public void warning(SAXParseException e) throws SAXException {16 }17 18 public void error(SAXParseException e) throws SAXException {19 throw e;20 }21 22 public void fatalError(SAXParseException e) throws SAXException {23 throw e;24 }25 }26