public class ExceptionUtils extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ExceptionUtils()
protected to avoid direct instanciation but allowing subclassing.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
throwIllegalArgumentExceptionIfTrue(boolean condition,
String exceptionMessage,
Object... exceptionMessageArgs)
Throws a
IllegalArgumentException if given condition is true with message formatted with given arguments
using String.format(String, Object...). |
protected ExceptionUtils()
public static void throwIllegalArgumentExceptionIfTrue(boolean condition,
String exceptionMessage,
Object... exceptionMessageArgs)
IllegalArgumentException if given condition is true with message formatted with given arguments
using String.format(String, Object...).condition - condition that will trigger the IllegalArgumentException if trueexceptionMessage - message set in thrown IllegalArgumentExceptionexceptionMessageArgs - arguments to be used to format exceptionMessageIllegalArgumentException - if condition is trueCopyright © 2018 AssertJ. All rights reserved.