Class ExceptionUtil


  • public final class ExceptionUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ExceptionUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.io.IOException constructIOException​(java.lang.String msg, java.lang.Throwable src)  
      static void setInitCause​(java.lang.Throwable newT, java.lang.Throwable rootT)  
      static void throwAsIllegalArgument​(java.lang.Throwable t)  
      static void throwGenericInternal()
      This method is just added for convenience, and only to be used for assertion style of exceptions.
      static void throwIfUnchecked​(java.lang.Throwable t)  
      static void throwInternal​(java.lang.String msg)  
      static void throwRuntimeException​(java.lang.Throwable t)
      Method that can be used to convert any Throwable to a RuntimeException; conversion is only done for checked exceptions.
      • Methods inherited from class java.lang.Object

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

      • ExceptionUtil

        private ExceptionUtil()
    • Method Detail

      • throwRuntimeException

        public static void throwRuntimeException​(java.lang.Throwable t)
        Method that can be used to convert any Throwable to a RuntimeException; conversion is only done for checked exceptions.
      • constructIOException

        public static java.io.IOException constructIOException​(java.lang.String msg,
                                                               java.lang.Throwable src)
      • throwAsIllegalArgument

        public static void throwAsIllegalArgument​(java.lang.Throwable t)
      • throwIfUnchecked

        public static void throwIfUnchecked​(java.lang.Throwable t)
      • throwGenericInternal

        public static void throwGenericInternal()
        This method is just added for convenience, and only to be used for assertion style of exceptions. For errors that actually occur, method with the string arg should be called instead.
      • throwInternal

        public static void throwInternal​(java.lang.String msg)
      • setInitCause

        public static void setInitCause​(java.lang.Throwable newT,
                                        java.lang.Throwable rootT)