I have a simple interface:
public interface BatchProcessorInterface<I,O> {
O process(I input);
}
Then, I have a lot of classes that implement this interface, 20+. My question is how can I implement exception handling (a try {} catch() {}), at the interface level? Is this doable? I don't see it as good code to put a try {} catch() {} block in each of the classes that implement the interface. Would an abstract class with method overloading be a better approach here?
Thank you!