|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.doolin.util.xml.SimpleErrorHandler
public class SimpleErrorHandler
This class implements a simple error handler that just stores the warnings and errors that occur during an XML parsing.
| Constructor Summary | |
|---|---|
SimpleErrorHandler()
|
|
| Method Summary | |
|---|---|
void |
error(SAXParseException exception)
|
void |
fatalError(SAXParseException exception)
|
List<SAXParseException> |
getErrors()
Returns the list of errors |
List<SAXParseException> |
getWarnings()
Returns the list of warnings |
boolean |
hasErrors()
Returns if the handler contains some errors. |
boolean |
hasWarnings()
Returns if the handler contains some warnings. |
void |
logWarnings(org.slf4j.Logger log)
Logs all the warnings |
void |
throwAnyError()
Throw the first error is any. |
void |
throwAnyWarningOrError()
Throw the first error or warning is any. |
void |
warning(SAXParseException exception)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleErrorHandler()
| Method Detail |
|---|
public void error(SAXParseException exception)
throws SAXException
error in interface ErrorHandlerSAXException
public void fatalError(SAXParseException exception)
throws SAXException
fatalError in interface ErrorHandlerSAXExceptionpublic List<SAXParseException> getErrors()
public List<SAXParseException> getWarnings()
public boolean hasErrors()
true if some errors have been generated.public boolean hasWarnings()
true if some warnings have been generated.public void logWarnings(org.slf4j.Logger log)
log - Logger to use
public void throwAnyError()
throws SAXParseException
SAXParseException - Thrown exception
public void throwAnyWarningOrError()
throws SAXParseException
SAXParseException - Thrown exception
public void warning(SAXParseException exception)
throws SAXException
warning in interface ErrorHandlerSAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||