|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.n52.security.common.xml.QuietErrorHandler
public class QuietErrorHandler
Class QuietErrorHandler collects all errors thrown by a parser, but never rethrow it.
A client can use one of the is* and get* methods to retrieve the thrown warnings, errors and fatal errors. The handler also logs the errors, but only on debug level, because a client shall evaluate the errors and properly react on them.
Constructor Summary | |
---|---|
QuietErrorHandler()
|
Method Summary | |
---|---|
void |
error(org.xml.sax.SAXParseException exception)
Handles the errors. |
void |
fatalError(org.xml.sax.SAXParseException exception)
Handles the fatal errors. |
java.util.Iterator |
getErrors()
Method gets the errors. |
java.util.Iterator |
getFatalErrors()
Method gets the fatalErrors. |
java.util.Iterator |
getWarnings()
Method gets the warnings. |
boolean |
isEmpty()
Method checks if warnings, errors or fatal errors are collected. |
boolean |
isError()
Method checks if errors are collected. |
boolean |
isFatalErrors()
Method checks if fatal errors are collected. |
boolean |
isWarning()
Checks if warnings are collected. |
void |
reset()
Method resets the internal state, so it is possible to use an instance many times. |
void |
warning(org.xml.sax.SAXParseException exception)
Handles the warning exceptions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QuietErrorHandler()
Method Detail |
---|
public java.util.Iterator getErrors()
public java.util.Iterator getWarnings()
public boolean isEmpty()
public boolean isError()
public boolean isFatalErrors()
public java.util.Iterator getFatalErrors()
public boolean isWarning()
public void error(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
exception
- the exception.
org.xml.sax.SAXException
- if error occurs.public void fatalError(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
exception
- the exception.
org.xml.sax.SAXException
- if error occurs.public void warning(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
warning
in interface org.xml.sax.ErrorHandler
exception
- the exception.
org.xml.sax.SAXException
- if error occurs.public void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |