public final class Exceptions extends Object
| Modifier and Type | Method and Description |
|---|---|
static IllegalArgumentException |
illegalArgument(String format,
Object... args)
Creates an
IllegalArgumentException with a formatted message. |
static IllegalArgumentException |
illegalArgument(Throwable cause,
String format,
Object... args)
Creates an
IllegalArgumentException with a cause and a formatted message. |
static IllegalStateException |
illegalState(String format,
Object... args)
Creates an
IllegalStateException with a formatted message. |
static IllegalStateException |
illegalState(Throwable cause,
String format,
Object... args)
Creates an
IllegalStateException with a cause and a formatted message. |
public static IllegalArgumentException illegalArgument(String format, Object... args)
IllegalArgumentException with a formatted message.format - See String.format(String, Object...)args - See String.format(String, Object...)IllegalArgumentException with a formatted messagepublic static IllegalArgumentException illegalArgument(Throwable cause, String format, Object... args)
IllegalArgumentException with a cause and a formatted message.cause - the cause to be setformat - See String.format(String, Object...)args - See String.format(String, Object...)IllegalArgumentException with given cause a formatted messagepublic static IllegalStateException illegalState(String format, Object... args)
IllegalStateException with a formatted message.format - See String.format(String, Object...)args - See String.format(String, Object...)IllegalStateException with a formatted messagepublic static IllegalStateException illegalState(Throwable cause, String format, Object... args)
IllegalStateException with a cause and a formatted message.cause - the cause to be setformat - See String.format(String, Object...)args - See String.format(String, Object...)IllegalStateException with given cause and formatted messageCopyright © 2021. All rights reserved.