T - The type of the Throwable handled.public class DefinedExceptionHandler<T extends Throwable> extends Object implements ExceptionHandler<T>
ExceptionHandler that contains the class of the Throwable handled.| Constructor and Description |
|---|
DefinedExceptionHandler(Class<T> handledException,
ExceptionHandler<T> exceptionHandler)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Class<T> |
getHandledException() |
void |
handle(Throwable throwable)
Handles the
Throwable. |
public DefinedExceptionHandler(Class<T> handledException, ExceptionHandler<T> exceptionHandler)
Throwable and an implementation of it's handler.handledException - The class of the Throwable to handle.exceptionHandler - The handler itself.public void handle(Throwable throwable)
ExceptionHandlerThrowable.handle in interface ExceptionHandler<T extends Throwable>throwable - The throwable to handle.Copyright © 2019. All rights reserved.