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(IPSElement aSourceElement,
String sMessage)
Emit an error.
|
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.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
|
protected AbstractPSErrorHandler()
protected AbstractPSErrorHandler(@Nullable IPSErrorHandler aNestedErrorHandler)
@Nullable public IPSErrorHandler getNestedErrorHandler()
protected abstract 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)
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 IPSElement aSourceElement, @Nonnull String sMessage)
IPSErrorHandler
IPSErrorHandler.error(IReadableResource, IPSElement, String, Throwable)
with
null
IReadableResource
and null
Throwable
.error
in interface IPSErrorHandler
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–2015 Philip Helger. All rights reserved.