edu.emory.mathcs.util.xml
Class AccumulatingErrorHandler
java.lang.Object
edu.emory.mathcs.util.xml.AccumulatingErrorHandler
- All Implemented Interfaces:
- org.xml.sax.ErrorHandler
- public class AccumulatingErrorHandler
- extends java.lang.Object
- implements org.xml.sax.ErrorHandler
SAX error handler that remembers all errors and warnings encountered during
parsing and offers methods to access them after parsing is done.
- Version:
- 1.0
- Author:
- Dawid Kurzyniec
Constructor Summary |
AccumulatingErrorHandler()
Creates a new accumulating error handler. |
AccumulatingErrorHandler(org.xml.sax.ErrorHandler delegate)
Creates a new accumulating error handler that, in addition to its
normal behavior, also delegates all events to the specified error
handler. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AccumulatingErrorHandler
public AccumulatingErrorHandler()
- Creates a new accumulating error handler.
AccumulatingErrorHandler
public AccumulatingErrorHandler(org.xml.sax.ErrorHandler delegate)
- Creates a new accumulating error handler that, in addition to its
normal behavior, also delegates all events to the specified error
handler.
warning
public void warning(org.xml.sax.SAXParseException ex)
throws org.xml.sax.SAXException
- Specified by:
warning
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
error
public void error(org.xml.sax.SAXParseException ex)
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 ex)
throws org.xml.sax.SAXException
- Specified by:
fatalError
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
hadWarnings
public boolean hadWarnings()
hadAnyErrors
public boolean hadAnyErrors()
hadNonfatalErrors
public boolean hadNonfatalErrors()
hadFatalErrors
public boolean hadFatalErrors()
hadAnyProblems
public boolean hadAnyProblems()
getWarnings
public org.xml.sax.SAXParseException[] getWarnings()
getAllErrors
public org.xml.sax.SAXParseException[] getAllErrors()
getNonfatalErrors
public org.xml.sax.SAXParseException[] getNonfatalErrors()
getFatalErrors
public org.xml.sax.SAXParseException[] getFatalErrors()
getAllProblems
public org.xml.sax.SAXParseException[] getAllProblems()
getDetails
public java.lang.String getDetails()