Package de.intarsys.tools.exception
Class ExceptionTools
java.lang.Object
de.intarsys.tools.exception.ExceptionTools
Tool class for dealing with Exceptions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IOException
createIOException
(String message, Throwable cause) static void
fail()
Simply fail with aRuntimeException
.static <T> T
futureSimpleGet
(Future<T> future) static <T extends Number>
TfutureSimpleGetNumber
(Future<T> future) static Throwable
getInChain
(Throwable t, Class<?> clazz) static Throwable
The root cause oft
.static String
static boolean
static boolean
-
Constructor Details
-
ExceptionTools
public ExceptionTools()
-
-
Method Details
-
createIOException
-
fail
public static void fail()Simply fail with aRuntimeException
. -
futureSimpleGet
-
futureSimpleGetNumber
-
getInChain
-
getRoot
The root cause oft
.- Parameters:
t
- AThrowable
.- Returns:
- The most inner cause of
t
.
-
getStackTraceString
-
isInChain
-
isKnownReason
-