Class ExceptionUtils


  • public class ExceptionUtils
    extends java.lang.Object
    Contains methods for dealing with exceptions.
    Since:
    1.5.0
    • Constructor Summary

      Constructors 
      Constructor Description
      ExceptionUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void assertThrownIllegalArgumentException​(@NotNull java.lang.Runnable runnable)
      Asserts that the specified runnable throws IllegalArgumentException and if not throws an junit assertion failure.
      static void assertThrownIllegalStateException​(@NotNull java.lang.Runnable runnable)
      Asserts that the specified runnable throws IllegalStateException and if not throws an junit assertion failure.
      static void assertThrownRuntimeException​(@NotNull java.lang.Runnable runnable)
      Asserts that the specified runnable throws RuntimeException and if not throws an junit assertion failure.
      • Methods inherited from class java.lang.Object

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

      • ExceptionUtils

        public ExceptionUtils()
    • Method Detail

      • assertThrownIllegalArgumentException

        public static void assertThrownIllegalArgumentException​(@NotNull
                                                                @NotNull java.lang.Runnable runnable)
        Asserts that the specified runnable throws IllegalArgumentException and if not throws an junit assertion failure.
        Parameters:
        runnable - the runnable to verify
      • assertThrownIllegalStateException

        public static void assertThrownIllegalStateException​(@NotNull
                                                             @NotNull java.lang.Runnable runnable)
        Asserts that the specified runnable throws IllegalStateException and if not throws an junit assertion failure.
        Parameters:
        runnable - the runnable to verify
      • assertThrownRuntimeException

        public static void assertThrownRuntimeException​(@NotNull
                                                        @NotNull java.lang.Runnable runnable)
        Asserts that the specified runnable throws RuntimeException and if not throws an junit assertion failure.
        Parameters:
        runnable - the runnable to verify