public final class Throwables extends Object
| 构造器和说明 |
|---|
Throwables() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <E> void |
caught(Consumer<E> consumer,
E arg) |
static <E,R> R |
caught(Function<E,R> function,
E arg) |
static <E,R> R |
caught(Function<E,R> function,
E arg,
R defaultValue) |
static void |
caught(Runnable runnable) |
static <R> R |
caught(Supplier<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 void caught(Runnable runnable)
public static <R> R caught(Supplier<R> supplier)
public static <E> void caught(Consumer<E> consumer, E arg)
public static <E,R> R caught(Function<E,R> function, E arg)
public static <E,R> R caught(Function<E,R> function, E arg, R defaultValue)
Copyright © 2023. All rights reserved.