Class Exceptions

java.lang.Object
aQute.bnd.exceptions.Exceptions

public class Exceptions extends Object
  • Field Details

    • DISPLAY_P

      static final Pattern DISPLAY_P
  • Constructor Details

    • Exceptions

      private Exceptions()
  • Method Details

    • unchecked

      public static <V> V unchecked(Callable<? extends V> callable)
    • unchecked

      public static void unchecked(RunnableWithException runnable)
    • duck

      public static RuntimeException duck(Throwable t)
    • throwsUnchecked

      private static <E extends Throwable> void throwsUnchecked(Throwable throwable) throws E
      Throws:
      E
    • toString

      public static String toString(Throwable t)
    • unrollCause

      public static Throwable unrollCause(Throwable t, Class<? extends Throwable> unrollType)
    • unrollCause

      public static Throwable unrollCause(Throwable t)
    • causes

      public static String causes(Throwable t)
    • getDisplayTypeName

      public static String getDisplayTypeName(Throwable e)
      Return a display name of an exception type. This is basically removing the package and the Exception or Error suffix.
      Parameters:
      e - the exception
      Returns:
      a display name for its type