Package com.helger.xml.sax
Class CollectingSAXErrorHandler
java.lang.Object
com.helger.xml.sax.AbstractSAXErrorHandler
com.helger.xml.sax.CollectingSAXErrorHandler
- All Implemented Interfaces:
ISAXErrorHandler,ErrorHandler
- Direct Known Subclasses:
WrappedCollectingSAXErrorHandler
An error handler implementation that stores all warnings, errors and fatal
errors.
- Author:
- Philip Helger
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCollectingSAXErrorHandler(Supplier<? extends com.helger.commons.error.list.ErrorList> aErrorListProvider) Protected constructor to use a differentErrorList- e.g. for existing error lists. -
Method Summary
Modifier and TypeMethodDescriptioncom.helger.commons.state.EChangeClear all currently stored errors.booleancom.helger.commons.error.list.IErrorListprotected voidinternalLog(com.helger.commons.error.level.IErrorLevel aErrorLevel, SAXParseException aException) toString()Methods inherited from class com.helger.xml.sax.AbstractSAXErrorHandler
error, fatalError, getSaxParseError, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.xml.sax.ISAXErrorHandler
andThen
-
Field Details
-
m_aRWLock
protected final com.helger.commons.concurrent.SimpleReadWriteLock m_aRWLock -
m_aErrors
protected final com.helger.commons.error.list.ErrorList m_aErrors
-
-
Constructor Details
-
CollectingSAXErrorHandler
public CollectingSAXErrorHandler() -
CollectingSAXErrorHandler
protected CollectingSAXErrorHandler(@Nonnull Supplier<? extends com.helger.commons.error.list.ErrorList> aErrorListProvider) Protected constructor to use a differentErrorList- e.g. for existing error lists.- Parameters:
aErrorListProvider- The error list provider. May not benull.- Since:
- 9.2.0
-
-
Method Details
-
internalLog
protected void internalLog(@Nonnull com.helger.commons.error.level.IErrorLevel aErrorLevel, SAXParseException aException) - Specified by:
internalLogin classAbstractSAXErrorHandler
-
getErrorList
-
containsAtLeastOneError
public boolean containsAtLeastOneError() -
clearResourceErrors
Clear all currently stored errors.- Returns:
EChange.CHANGEDif at least one item was cleared.
-
toString
- Overrides:
toStringin classAbstractSAXErrorHandler
-