mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8296226: Add constructors (String,Throwable) and (Throwable) to InvalidParameterException
Reviewed-by: mullan, mdoerr
This commit is contained in:
parent
51f8e9b0e1
commit
8836b92593
8 changed files with 60 additions and 13 deletions
|
@ -58,4 +58,44 @@ public class InvalidParameterException extends IllegalArgumentException {
|
|||
public InvalidParameterException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an {@code InvalidParameterException} with the specified
|
||||
* detail message and cause. A detail message is a {@code String}
|
||||
* that describes this particular exception.
|
||||
*
|
||||
* <p>Note that the detail message associated with {@code cause} is
|
||||
* <i>not</i> automatically incorporated in this exception's detail
|
||||
* message.
|
||||
*
|
||||
* @param msg the detail message (which is saved for later retrieval
|
||||
* by the {@link Throwable#getMessage()} method).
|
||||
* @param cause the cause (which is saved for later retrieval by the
|
||||
* {@link Throwable#getCause()} method). (A {@code null} value
|
||||
* is permitted, and indicates that the cause is nonexistent or
|
||||
* unknown.)
|
||||
*
|
||||
* @since 20
|
||||
*/
|
||||
public InvalidParameterException(String msg, Throwable cause) {
|
||||
super(msg, cause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an {@code InvalidParameterException} with the specified cause
|
||||
* and a detail message of {@code (cause==null ? null : cause.toString())}
|
||||
* (which typically contains the class and detail message of {@code cause}).
|
||||
* This constructor is useful for exceptions that are little more than
|
||||
* wrappers for other throwables.
|
||||
*
|
||||
* @param cause the cause (which is saved for later retrieval by the
|
||||
* {@link Throwable#getCause()} method). (A {@code null} value is
|
||||
* permitted, and indicates that the cause is nonexistent or
|
||||
* unknown.)
|
||||
*
|
||||
* @since 20
|
||||
*/
|
||||
public InvalidParameterException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue