Class ExceptionTools


  • public final class ExceptionTools
    extends java.lang.Object
    Author:
    Lukas Eder
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T extends java.lang.Throwable>
      T
      getCause​(java.lang.Throwable t, java.lang.Class<? extends T> type)
      Find a root cause of a given type, or null if no root cause of that type was found.
      static void sneakyThrow​(java.lang.Throwable throwable)
      Sneaky throw any type of Throwable.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getCause

        public static <T extends java.lang.Throwable> T getCause​(java.lang.Throwable t,
                                                                 java.lang.Class<? extends T> type)
        Find a root cause of a given type, or null if no root cause of that type was found.
      • sneakyThrow

        public static void sneakyThrow​(java.lang.Throwable throwable)
        Sneaky throw any type of Throwable.