public class CollectingPSErrorHandler extends AbstractPSErrorHandler
IPSErrorHandler that collects all error
messages.| Constructor and Description |
|---|
CollectingPSErrorHandler() |
CollectingPSErrorHandler(IPSErrorHandler aNestedErrorHandler) |
| Modifier and Type | Method and Description |
|---|---|
com.helger.commons.state.EChange |
clearResourceErrors()
Clear all currently stored errors.
|
com.helger.commons.error.IResourceErrorGroup |
getAllErrors() |
com.helger.commons.error.IResourceErrorGroup |
getAllFailures() |
com.helger.commons.collection.ext.ICommonsList<com.helger.commons.error.IResourceError> |
getAllResourceErrors() |
com.helger.commons.error.IResourceErrorGroup |
getResourceErrors() |
protected void |
handle(com.helger.commons.io.resource.IReadableResource aRes,
com.helger.commons.error.IErrorLevel aErrorLevel,
IPSElement aSourceElement,
String sMessage,
Throwable t)
The abstract method that is called for both warnings and errors.
|
boolean |
isEmpty() |
String |
toString() |
error, error, getNestedErrorHandler, warnpublic CollectingPSErrorHandler()
public CollectingPSErrorHandler(@Nullable IPSErrorHandler aNestedErrorHandler)
protected void handle(@Nullable com.helger.commons.io.resource.IReadableResource aRes, @Nonnull com.helger.commons.error.IErrorLevel aErrorLevel, @Nullable IPSElement aSourceElement, @Nonnull String sMessage, @Nullable Throwable t)
AbstractPSErrorHandlerhandle in class AbstractPSErrorHandleraRes - The resource in which the error occurred.aErrorLevel - The error level. Never null.aSourceElement - The source schematron element, in which the error occurred. Maybe
null for XPath errors.sMessage - The error message. Never null.t - The optional exception that might have occurred. May be
null.@Nonnull @ReturnsMutableCopy public com.helger.commons.error.IResourceErrorGroup getResourceErrors()
@Nonnull public com.helger.commons.collection.ext.ICommonsList<com.helger.commons.error.IResourceError> getAllResourceErrors()
@Nonnull @ReturnsMutableCopy public com.helger.commons.error.IResourceErrorGroup getAllFailures()
@Nonnull @ReturnsMutableCopy public com.helger.commons.error.IResourceErrorGroup getAllErrors()
@Nonnull public com.helger.commons.state.EChange clearResourceErrors()
EChange.CHANGED if at least one item was cleared.public boolean isEmpty()
true if no error is contained, false if
at least one error is contained.public String toString()
toString in class AbstractPSErrorHandlerCopyright © 2014–2016 Philip Helger. All rights reserved.