de.intarsys.tools.exception
Class ExceptionTools
java.lang.Object
de.intarsys.tools.exception.ExceptionTools
public class ExceptionTools
- extends Object
Tool class for dealing with Exceptions.
ExceptionTools
public ExceptionTools()
createIOException
public static IOException createIOException(String message,
Throwable cause)
fail
public static void fail()
- Simply fail with a
RuntimeException
.
futureSimpleGet
public static <T> T futureSimpleGet(Future<T> future)
futureSimpleGetNumber
public static <T extends Number> T futureSimpleGetNumber(Future<T> future)
getInChain
public static Throwable getInChain(Throwable t,
Class<?> clazz)
getRoot
public static Throwable getRoot(Throwable t)
- The root cause of
t
.
- Parameters:
t
- A Throwable
.
- Returns:
- The most inner cause of
t
.
getStackTraceString
public static String getStackTraceString(Throwable t)
isInChain
public static boolean isInChain(Throwable t,
Class<?> clazz)
isKnownReason
public static boolean isKnownReason(Throwable t)
Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.