- All Known Implementing Classes:
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ErrorReporterThe ErrorReporter is a generic functional interface for reporting errors and warnings.
The error or warning is reported in the form of an
XmlProcessingError; unlike the JAXP
ErrorHandlerit is possible to report errors without expensively construction an exception object.
accept()method does not throw any checked exceptions. It may however, throw an
UncheckedXPathExceptionindicating that processing is to be terminated without looking for further errors.
A warning condition is notified using an
isWarning()property is true.
void report(XmlProcessingError error)Report an error. This method is called by Saxon when an error needs to be reported to the calling application.
The application can safely ignore the error if
The application can indicate to Saxon that the error should be considered fatal by calling
StaticError.setFatal(String). The precise effect of marking an error as fatal is not defined, and may depend on the circumstances; in some cases it may have no effect. If a dynamic error is marked as fatal then an attempt to catch the error using a try/catch construct in XSLT or XQuery will generally be unsuccessful.
error- details of the error to be reported