public final class ExceptionProvider extends Object
| Modifier and Type | Method and Description |
|---|---|
<T extends Throwable> |
catchEx(@NotNull Class<T> exceptionClass,
@NotNull Consumer<T> exceptionConsumer)
Apply consumer if the exception is not null.
|
void |
catchEx(@NotNull Consumer<Throwable> exceptionConsumer)
Apply consumer if the exception is a required type (or not null).
|
static @NotNull ExceptionProvider |
of()
A factory method
|
static @NotNull ExceptionProvider |
of(@NotNull Throwable e)
A factory method
|
public void catchEx(@NotNull
@NotNull Consumer<Throwable> exceptionConsumer)
public <T extends Throwable> void catchEx(@NotNull @NotNull Class<T> exceptionClass, @NotNull @NotNull Consumer<T> exceptionConsumer)
@NotNull public static @NotNull ExceptionProvider of(@NotNull @NotNull Throwable e)
@NotNull public static @NotNull ExceptionProvider of()
Copyright 2015, Pavel Ponec