What is this template?

I have several classes that perform background tasks that can throw exceptions. They all implement the following interface:

public interface HowDoYouCallMe {
    void addExceptionHandler(ExceptionHandler handler);
}

When one of the background tasks raises an exception, all ExceptionHandlers report an exception so that it can be handled / propagated correctly.

What would you call an interface? ExceptionHandlerObservable (not big)?

+5
source share
5 answers

It looks like an observer pattern applied to exception handling. So the interface will probably be called ExceptionObservableor something like that.

+12
source

, , , EventBroker. , ExceptionBroker.

+3

IObservableException.

0
source

I would call it something like "HandlesExceptions"

0
source

Like IDisposable and ICloneable, this class can be called IExceptionHandlerObservable

-1
source

All Articles