public class Throwables extends Object
| 构造器和说明 |
|---|
Throwables() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Throwable |
getRootCause(Throwable ex) |
static String |
getStackTraceAsString(Throwable throwable) |
static void |
log(org.slf4j.Logger logger,
org.slf4j.event.Level level,
String message,
Throwable ex) |
static void |
log(Throwable ex) |
static void |
throwAsRuntimeException(Throwable ex) |
static Throwable |
throwIfError(Throwable ex) |
static Throwable |
throwIfIOException(Throwable ex) |
static Throwable |
throwIfRuntimeException(Throwable ex) |
static Throwable |
throwRootCauseIfIOException(Throwable ex)
step1 : get root cause
step2 : throwIfIOException(root cause)
|
static RuntimeException |
wrapAsRuntimeException(Throwable ex) |
public static Throwable throwIfIOException(Throwable ex) throws IOException
IOExceptionpublic static RuntimeException wrapAsRuntimeException(Throwable ex)
public static void throwAsRuntimeException(Throwable ex)
public static Throwable throwRootCauseIfIOException(Throwable ex) throws IOException
IOExceptionpublic static void log(Throwable ex)
Copyright © 2019. All rights reserved.