Package org.assertj.guava.util
Class ExceptionUtils
- java.lang.Object
-
- org.assertj.guava.util.ExceptionUtils
-
public class ExceptionUtils extends Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ExceptionUtils()
protected to avoid direct instanciation but allowing subclassing.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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...)
.
-
-
-
Method Detail
-
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
-
-