public final class Throwables extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
Throwables.ThrowingCallable<R,T extends Throwable>
Lambda function checked exception
|
static interface |
Throwables.ThrowingConsumer<E,T extends Throwable>
Lambda function checked exception
|
static interface |
Throwables.ThrowingFunction<E,R,T extends Throwable>
Lambda function checked exception
|
static interface |
Throwables.ThrowingRunnable<T extends Throwable> |
static interface |
Throwables.ThrowingSupplier<R,T extends Throwable>
Lambda function checked exception
|
| 构造器和说明 |
|---|
Throwables() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <E> Consumer<E> |
caught(Throwables.ThrowingConsumer<E,?> consumer) |
static <E,R> Function<E,R> |
caught(Throwables.ThrowingFunction<E,R,?> function) |
static Runnable |
caught(Throwables.ThrowingRunnable<?> runnable) |
static <R> Supplier<R> |
caught(Throwables.ThrowingSupplier<R,?> supplier) |
static String |
getRootCauseMessage(Throwable throwable) |
static String |
getRootCauseStackTrace(Throwable throwable)
Gets the root cause throwable stack trace
|
public static String getRootCauseStackTrace(Throwable throwable)
throwable - the throwablepublic static Runnable caught(Throwables.ThrowingRunnable<?> runnable)
public static <E> Consumer<E> caught(Throwables.ThrowingConsumer<E,?> consumer)
public static <R> Supplier<R> caught(Throwables.ThrowingSupplier<R,?> supplier)
public static <E,R> Function<E,R> caught(Throwables.ThrowingFunction<E,R,?> function)
Copyright © 2023. All rights reserved.