Class ExceptionTools

java.lang.Object
de.intarsys.tools.exception.ExceptionTools

public class ExceptionTools extends Object
Tool class for dealing with Exceptions.
  • Constructor Details

    • ExceptionTools

      public ExceptionTools()
  • Method Details

    • 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)