public class BasicIllegalArgumentException extends IllegalArgumentException
Constructor and Description |
---|
BasicIllegalArgumentException(String message,
Object... args)
Constructor.
|
BasicIllegalArgumentException(Throwable causedBy,
String message,
Object... args)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
assertArgsOnlyOfType(MethodInfo m,
Class<?>... args)
Throws a
BasicIllegalArgumentException if the specified method does not only contain args of the specified types. |
<T extends Throwable> |
getCause(Class<T> c)
Same as
Throwable.getCause() but searches the throwable chain for an exception of the specified type. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public BasicIllegalArgumentException(String message, Object... args)
message
- The MessageFormat
-style message.args
- Optional MessageFormat
-style arguments.public BasicIllegalArgumentException(Throwable causedBy, String message, Object... args)
causedBy
- The cause of this exception.message
- The MessageFormat
-style message.args
- Optional MessageFormat
-style arguments.public static void assertArgsOnlyOfType(MethodInfo m, Class<?>... args)
BasicIllegalArgumentException
if the specified method does not only contain args of the specified types.m
- The method to check.args
- The allowed args.public <T extends Throwable> T getCause(Class<T> c)
Throwable.getCause()
but searches the throwable chain for an exception of the specified type.T
- The throwable type to search for.c
- The throwable type to search for.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.