- All Known Implementing Classes:
ErrorHandlerBase
public interface ErrorHandler
An Error handler captures the policy for dealing with warnings, errors and
fatal errors. Fatal errors mean termination of processing and must throw
an exception. Errors and warnings may throw an exception to terminate
processing or may return after, for example, logging a message. The exact
policy is determined the error handler itself.
IRI parsing does not throw errors except for bad syntax.
Scheme specific issues are "violations" carried by the IRI3986 object
and accessed with IRI3986.forEachViolation(java.util.function.Consumer<org.apache.jena.rfc3986.Violation>).
Use with SystemIRI3986.toHandler.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorHandlerCreate an error handler with two functions, one for warning, one for error.voidReport an error : should not return.voidReport a warning.
-
Method Details
-
create
Create an error handler with two functions, one for warning, one for error. A value of null implies using a "no action" function. -
warning
Report a warning. This method may return. -
error
Report an error : should not return.
-