Package org.assertj.guava.util
Class ExceptionUtils
java.lang.Object
org.assertj.guava.util.ExceptionUtils
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected to avoid direct instanciation but allowing subclassing. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
throwIllegalArgumentExceptionIfTrue
(boolean condition, String exceptionMessage, Object... exceptionMessageArgs) Throws aIllegalArgumentException
if 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 aIllegalArgumentException
if given condition is true with message formatted with given arguments usingString.format(String, Object...)
.- Parameters:
condition
- condition that will trigger theIllegalArgumentException
if trueexceptionMessage
- message set in thrown IllegalArgumentExceptionexceptionMessageArgs
- arguments to be used to format exceptionMessage- Throws:
IllegalArgumentException
- if condition is true
-