For Search 5 we could think about several changes to the ErrorHandler API. A given is the improvement of the javadocs and online documentation (see HSEARCH-1353). Aside of that I suggest the following changes:
-
Have a single ErrorHandler#handle(ErrorContext) method with subclasses of ErrorContext (offer some sort of unwrap functionality for the user to deal with the different types)
-
If we not implement the single handle(ErrorContext) apporach I recommend at least to drop Exception in ErrorHandler#handleException. It would make the API more uniform
-
Regarding ErrorContext we should rename getFailingOperations and getOperationAtFault to make their intend clearer. A suggestion would be getNonAppliedWork() and getExceptionCausingWork() respective
|