public class Exceptions extends Object
Modifier and Type | Method and Description |
---|---|
static IllegalArgumentException |
illegalArgument(String format,
Object... args)
Constructs an
IllegalArgumentException with the given formatted result. |
static RuntimeException |
runtime(String format,
Object... args)
Constructs an
RuntimeException with the given formatted result. |
public static IllegalArgumentException illegalArgument(String format, Object... args)
IllegalArgumentException
with the given formatted result.
Equivalent to new IllegalArgumentException(String.format(format, args))
.
format
- the format stringargs
- the format argumentspublic static RuntimeException runtime(String format, Object... args)
RuntimeException
with the given formatted result.
Equivalent to new RuntimeException(String.format(format, args))
.
format
- the format stringargs
- the format argumentsCopyright © 2024. All rights reserved.