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() |
List<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, warn
public 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)
AbstractPSErrorHandler
handle
in class AbstractPSErrorHandler
aRes
- 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 List<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 AbstractPSErrorHandler
Copyright © 2014–2015 Philip Helger. All rights reserved.