public abstract class AbstractCollectingPSErrorHandler extends AbstractPSErrorHandler
IPSErrorHandler
that collects all error messages
in an error list.Constructor and Description |
---|
AbstractCollectingPSErrorHandler(com.helger.commons.error.list.ErrorList aErrorList,
IPSErrorHandler aNestedErrorHandler) |
Modifier and Type | Method and Description |
---|---|
com.helger.commons.state.EChange |
clearResourceErrors()
Clear all currently stored errors.
|
com.helger.commons.error.list.IErrorList |
getAllErrors() |
com.helger.commons.error.list.IErrorList |
getAllFailures() |
com.helger.commons.error.list.IErrorList |
getErrorList() |
protected void |
handle(com.helger.commons.io.resource.IReadableResource aRes,
com.helger.commons.error.level.IErrorLevel aErrorLevel,
IPSElement aSourceElement,
String sMessage,
Throwable t)
The abstract method that is called for both warnings and errors.
|
boolean |
isEmpty() |
String |
toString() |
error, getNestedErrorHandler, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
error
public AbstractCollectingPSErrorHandler(@Nonnull com.helger.commons.error.list.ErrorList aErrorList, @Nullable IPSErrorHandler aNestedErrorHandler)
protected void handle(@Nullable com.helger.commons.io.resource.IReadableResource aRes, @Nonnull com.helger.commons.error.level.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.list.IErrorList getErrorList()
@Nonnull @ReturnsMutableCopy public com.helger.commons.error.list.IErrorList getAllFailures()
@Nonnull @ReturnsMutableCopy public com.helger.commons.error.list.IErrorList 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–2017 Philip Helger. All rights reserved.