| Modifier and Type | Method and Description |
|---|---|
default <V1 extends V,X extends Throwable> |
Throwing.Consumer.onFailure(Class<? extends X> type,
Consumer<X> action)
Execute the given action before throwing the exception.
|
default <V1 extends V> |
Throwing.Consumer.onFailure(Consumer<Throwable> action)
Execute the given action before throwing the exception.
|
static <V> Throwing.Consumer<V> |
Throwing.throwingConsumer(Throwing.Consumer<V> action) |
default <V1 extends V,X extends Throwable> |
Throwing.Consumer.unwrap(Class<? extends X> type)
Unwrap an exception and rethrow.
|
default <V1 extends V> |
Throwing.Consumer.wrap(Function<Throwable,Exception> wrapper)
Wrap an exception as new exception provided by the given wrap function.
|
| Modifier and Type | Method and Description |
|---|---|
Try |
Try.onComplete(Throwing.Consumer<Throwable> action)
Always run the given action, works like a finally clause.
|
Try.Value<V> |
Try.Value.onComplete(Throwing.Consumer<Throwable> action) |
Try |
Try.ResourceHandler.run(Throwing.Consumer<R> fn)
Run an operation over the resource.
|
static <V> Throwing.Consumer<V> |
Throwing.throwingConsumer(Throwing.Consumer<V> action) |
Copyright © 2017. All rights reserved.