cs101.xml
Class SimpleErrorHandler
java.lang.Object
cs101.xml.SimpleErrorHandler
- All Implemented Interfaces:
- org.xml.sax.ErrorHandler
- public class SimpleErrorHandler
- extends java.lang.Object
- implements org.xml.sax.ErrorHandler
A blindingly simple and completely unforgiving xml ErrorHandler.
It is only suitable for use when all errors and warnings have the
same meaning. All methods in this class will do nothing but
rethrow the supplied SAXParseException as a SAXException with a message
indicating which method was called. While the message could be parsed
to determine which type of error was produced, it is probably better
to extend this class and overide the methods you want to distingush
or implement your own error handler.
- Author:
- Patrick G. Heck @, gus.heck@olin.edu
Method Summary |
void |
error(org.xml.sax.SAXParseException spe)
|
void |
fatalError(org.xml.sax.SAXParseException spe)
|
void |
warning(org.xml.sax.SAXParseException spe)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERROR
public static final java.lang.String ERROR
- See Also:
- Constant Field Values
FATAL_ERROR
public static final java.lang.String FATAL_ERROR
- See Also:
- Constant Field Values
WARNING
public static final java.lang.String WARNING
- See Also:
- Constant Field Values
SimpleErrorHandler
public SimpleErrorHandler()
- Creates a new instance of SimpleErrorHandler
error
public void error(org.xml.sax.SAXParseException spe)
throws org.xml.sax.SAXException
- Specified by:
error
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
fatalError
public void fatalError(org.xml.sax.SAXParseException spe)
throws org.xml.sax.SAXException
- Specified by:
fatalError
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
warning
public void warning(org.xml.sax.SAXParseException spe)
throws org.xml.sax.SAXException
- Specified by:
warning
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException