Package org.apache.tika.config
Interface LoadErrorHandler
Deprecated.
This version of the Apache Tika library is deprecated. Use your own version of Apache Tika.
Interface for error handling strategies in service class loading.
You can implement this interface for a custom error handling mechanism,
or use one of the predefined strategies.
- Since:
- Apache Tika 0.9
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LoadErrorHandlerDeprecated.Strategy that simply ignores all problems.static final LoadErrorHandlerDeprecated.Strategy that throws aRuntimeExceptionwith the given throwable as the root cause, thus interrupting the entire service loading operation.static final LoadErrorHandlerDeprecated.Strategy that logs warnings of all problems using aLoggercreated using the given class name. -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleLoadError(String classname, Throwable throwable) Deprecated.Handles a problem encountered when trying to load the specified service class.
-
Field Details
-
IGNORE
Deprecated.Strategy that simply ignores all problems. -
WARN
Deprecated.Strategy that logs warnings of all problems using aLoggercreated using the given class name. -
THROW
Deprecated.Strategy that throws aRuntimeExceptionwith the given throwable as the root cause, thus interrupting the entire service loading operation.
-
-
Method Details
-
handleLoadError
Deprecated.Handles a problem encountered when trying to load the specified service class. The implementation can log or otherwise process the given error information. If the method returns normally, then the service loader simply skips this class and continues with the next one.- Parameters:
classname- name of the service classthrowable- the encountered problem
-