public abstract class AbstractPSErrorHandler extends Object implements IPSErrorHandler
IPSErrorHandler
.Modifier | Constructor and Description |
---|---|
protected |
AbstractPSErrorHandler() |
protected |
AbstractPSErrorHandler(IPSErrorHandler aNestedErrorHandler) |
Modifier and Type | Method and Description |
---|---|
void |
error(com.helger.commons.io.resource.IReadableResource aRes,
IPSElement aSourceElement,
String sMessage,
Throwable t)
Emit an error
|
IPSErrorHandler |
getNestedErrorHandler() |
protected abstract 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.
|
String |
toString() |
void |
warn(com.helger.commons.io.resource.IReadableResource aRes,
IPSElement aSourceElement,
String sMessage)
Emit a warning
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
error
protected AbstractPSErrorHandler()
protected AbstractPSErrorHandler(@Nullable IPSErrorHandler aNestedErrorHandler)
@Nullable public IPSErrorHandler getNestedErrorHandler()
null
if none was provided.protected abstract 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)
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
.public final void warn(@Nullable com.helger.commons.io.resource.IReadableResource aRes, @Nullable IPSElement aSourceElement, @Nonnull String sMessage)
IPSErrorHandler
warn
in interface IPSErrorHandler
aRes
- The resource in which the error occurred. May be null
.aSourceElement
- The source element where the warning is encountered. Maybe
null
for XPath errors.sMessage
- The main warning message. Never null
.public final void error(@Nullable com.helger.commons.io.resource.IReadableResource aRes, @Nullable IPSElement aSourceElement, @Nonnull String sMessage, @Nullable Throwable t)
IPSErrorHandler
error
in interface IPSErrorHandler
aRes
- The resource in which the error occurred. May be null
.aSourceElement
- The source element where the warning is encountered. Maybe
null
for XPath errors.sMessage
- The main warning message. Never null
.t
- An optional exception that is the source of the error. May be
null
.Copyright © 2014–2017 Philip Helger. All rights reserved.