Package java.lang
Class IllegalArgumentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
EnumConstantMissingException,IllegalCharsetNameException,IllegalFormatException,IllegalSelectorException,IllegalThreadStateException,InvalidParameterException,NumberFormatException,PatternSyntaxException,UnresolvedAddressException,UnsupportedAddressTypeException,UnsupportedCharsetException
public class IllegalArgumentException extends RuntimeException
Thrown when a method is invoked with an argument which it can not reasonably
deal with.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description IllegalArgumentException()Constructs a newIllegalArgumentExceptionthat includes the current stack trace.IllegalArgumentException(String detailMessage)Constructs a newIllegalArgumentExceptionwith the current stack trace and the specified detail message.IllegalArgumentException(String message, Throwable cause)Constructs a newIllegalArgumentExceptionwith the current stack trace, the specified detail message and the specified cause.IllegalArgumentException(Throwable cause)Constructs a newIllegalArgumentExceptionwith the current stack trace and the specified cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
IllegalArgumentException
public IllegalArgumentException()Constructs a newIllegalArgumentExceptionthat includes the current stack trace. -
IllegalArgumentException
Constructs a newIllegalArgumentExceptionwith the current stack trace and the specified detail message.- Parameters:
detailMessage- the detail message for this exception.
-
IllegalArgumentException
Constructs a newIllegalArgumentExceptionwith the current stack trace, the specified detail message and the specified cause.- Parameters:
message- the detail message for this exception.cause- the cause of this exception, may benull.- Since:
- 1.5
-
IllegalArgumentException
Constructs a newIllegalArgumentExceptionwith the current stack trace and the specified cause.- Parameters:
cause- the cause of this exception, may benull.- Since:
- 1.5
-