public class ExceptionTools
extends java.lang.Object
Constructor and Description |
---|
ExceptionTools() |
Modifier and Type | Method and Description |
---|---|
static java.io.IOException |
createIOException(java.lang.String message,
java.lang.Throwable cause) |
static void |
fail()
Simply fail with a
RuntimeException . |
static <T> T |
futureSimpleGet(java.util.concurrent.Future<T> future) |
static <T extends java.lang.Number> |
futureSimpleGetNumber(java.util.concurrent.Future<T> future) |
static java.lang.Throwable |
getInChain(java.lang.Throwable t,
java.lang.Class<?> clazz) |
static java.lang.Throwable |
getRoot(java.lang.Throwable t)
The root cause of
t . |
static java.lang.String |
getStackTraceString(java.lang.Throwable t) |
static boolean |
isInChain(java.lang.Throwable t,
java.lang.Class<?> clazz) |
static boolean |
isKnownReason(java.lang.Throwable t) |
public static java.io.IOException createIOException(java.lang.String message, java.lang.Throwable cause)
public static void fail()
RuntimeException
.public static <T> T futureSimpleGet(java.util.concurrent.Future<T> future)
public static <T extends java.lang.Number> T futureSimpleGetNumber(java.util.concurrent.Future<T> future)
public static java.lang.Throwable getInChain(java.lang.Throwable t, java.lang.Class<?> clazz)
public static java.lang.Throwable getRoot(java.lang.Throwable t)
t
.t
- A Throwable
.t
.public static java.lang.String getStackTraceString(java.lang.Throwable t)
public static boolean isInChain(java.lang.Throwable t, java.lang.Class<?> clazz)
public static boolean isKnownReason(java.lang.Throwable t)