public class ArgumentException extends IllegalArgumentException
Constructor and Description |
---|
ArgumentException()
Initializes a new instance.
|
ArgumentException(String message)
Initializes a new instance with a specified error message.
|
ArgumentException(String message,
Exception cause)
Initializes a new instance with a specified error message and a reference to the
inner exception that is the cause of this exception.
|
ArgumentException(String message,
String paramName)
Initializes a new instance with a specified error message and the name of the
parameter that causes this exception.
|
ArgumentException(String message,
String paramName,
Exception cause)
Initializes a new instance with a specified error message, the parameter name, and
a reference to the inner exception that is the cause of this exception.
|
Modifier and Type | Method and Description |
---|---|
String |
getMessage()
Returns the detail message string of this throwable.
|
String |
getParamName()
Gets the name of the parameter that causes this exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ArgumentException()
public ArgumentException(String message)
message
- The error message that explains the reason for the exception.public ArgumentException(String message, Exception cause)
message
- The error message that explains the reason for the exception.cause
- The exception that is the cause of the current exception.public ArgumentException(String message, String paramName)
message
- The error message that explains the reason for the exception.paramName
- The name of the parameter that caused the current exception.public ArgumentException(String message, String paramName, Exception cause)
message
- The error message that explains the reason for the exception.paramName
- The name of the parameter that caused the current exception.cause
- The exception that is the cause of the current exception.public String getMessage()
java.lang.Throwable
getMessage
in class Throwable
Throwable
instance
(which may be null
).public String getParamName()