|
||||||||||
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
Collects all errors thrown by a parser, but never rethrows them.
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(SAXParseException exception)
Handles the errors. |
void |
fatalError(SAXParseException exception)
Handles the fatal errors. |
Iterator<Exception> |
getErrors()
|
Iterator<Exception> |
getFatalErrors()
|
Iterator<Exception> |
getWarnings()
|
boolean |
isEmpty()
Method checks if warnings, errors or fatal errors are collected. |
boolean |
isError()
Checks if errors are collected. |
boolean |
isFatalErrors()
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(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 Iterator<Exception> getErrors()
public Iterator<Exception> getWarnings()
public boolean isEmpty()
public boolean isError()
public boolean isFatalErrors()
public Iterator<Exception> getFatalErrors()
public boolean isWarning()
public void error(SAXParseException exception) throws SAXException
error
in interface ErrorHandler
exception
- the exception.
SAXException
- if error occurs.public void fatalError(SAXParseException exception) throws SAXException
fatalError
in interface ErrorHandler
exception
- the exception.
SAXException
- if error occurs.public void warning(SAXParseException exception) throws SAXException
warning
in interface ErrorHandler
exception
- the exception.
SAXException
- if error occurs.public void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |