Package org.assertj.guava.util
Class ExceptionUtils
- java.lang.Object
-
- org.assertj.guava.util.ExceptionUtils
-
public class ExceptionUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedExceptionUtils()protected to avoid direct instanciation but allowing subclassing.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidthrowIllegalArgumentExceptionIfTrue(boolean condition, java.lang.String exceptionMessage, java.lang.Object... exceptionMessageArgs)Throws aIllegalArgumentExceptionif given condition is true with message formatted with given arguments usingString.format(String, Object...).
-
-
-
Method Detail
-
throwIllegalArgumentExceptionIfTrue
public static void throwIllegalArgumentExceptionIfTrue(boolean condition, java.lang.String exceptionMessage, java.lang.Object... exceptionMessageArgs)Throws aIllegalArgumentExceptionif given condition is true with message formatted with given arguments usingString.format(String, Object...).- Parameters:
condition- condition that will trigger theIllegalArgumentExceptionif trueexceptionMessage- message set in thrown IllegalArgumentExceptionexceptionMessageArgs- arguments to be used to format exceptionMessage- Throws:
java.lang.IllegalArgumentException- if condition is true
-
-