Package org.assertj.guava.util
Class ExceptionUtils
java.lang.Object
org.assertj.guava.util.ExceptionUtils
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotected to avoid direct instanciation but allowing subclassing. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidthrowIllegalArgumentExceptionIfTrue(boolean condition, String exceptionMessage, Object... exceptionMessageArgs) Throws aIllegalArgumentExceptionif given condition is true with message formatted with given arguments usingString.format(String, Object...).
-
Constructor Details
-
ExceptionUtils
protected ExceptionUtils()protected to avoid direct instanciation but allowing subclassing.
-
-
Method Details
-
throwIllegalArgumentExceptionIfTrue
public static void throwIllegalArgumentExceptionIfTrue(boolean condition, String exceptionMessage, 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:
IllegalArgumentException- if condition is true
-