E - The exception type that is handledpublic abstract class ExceptionHandler<E extends java.lang.Exception>
extends java.lang.Object
| Constructor and Description |
|---|
ExceptionHandler() |
| Modifier and Type | Method and Description |
|---|---|
static <E extends java.lang.Exception> |
defaultHandler() |
abstract void |
handle(E exception)
Handles the given
exception, e.g. by printing, logging or rethrowing it. |
abstract void |
handle(java.lang.RuntimeException runtimeException)
Handles the given
runtimeException, e.g. by printing, logging or rethrowing it. |
public static <E extends java.lang.Exception> ExceptionHandler<E> defaultHandler()
ExceptionHandler that merely rethrows the exceptions it receives as arguments.public abstract void handle(E exception) throws E extends java.lang.Exception
exception, e.g. by printing, logging or rethrowing it.E extends java.lang.Exceptionpublic abstract void handle(java.lang.RuntimeException runtimeException)
runtimeException, e.g. by printing, logging or rethrowing it.