40 lines
1.2 KiB
Java
40 lines
1.2 KiB
Java
package com.mattrixwv.cipherstream.exceptions;
|
|
|
|
|
|
/**
|
|
* Thrown to indicate that a problem has occurred related to an invalid key.
|
|
*/
|
|
public class InvalidKeyException extends RuntimeException{
|
|
/**
|
|
* Constructs a new {@code InvalidKeyException} with {@code null} as its detail message.
|
|
*/
|
|
public InvalidKeyException(){
|
|
super();
|
|
}
|
|
/**
|
|
* Constructs a new {@code InvalidKeyException} with the specified detail message.
|
|
*
|
|
* @param message the detail message, which is saved for later retrieval by the {@link #getMessage()} method
|
|
*/
|
|
public InvalidKeyException(String message){
|
|
super(message);
|
|
}
|
|
/**
|
|
* Constructs a new {@code InvalidKeyException} with the specified cause.
|
|
*
|
|
* @param error the cause, which is saved for later retrieval by the {@link #getCause()} method
|
|
*/
|
|
public InvalidKeyException(Throwable error){
|
|
super(error);
|
|
}
|
|
/**
|
|
* Constructs a new {@code InvalidKeyException} with the specified detail message and cause.
|
|
*
|
|
* @param message the detail message, which is saved for later retrieval by the {@link #getMessage()} method
|
|
* @param error the cause, which is saved for later retrieval by the {@link #getCause()} method
|
|
*/
|
|
public InvalidKeyException(String message, Throwable error){
|
|
super(message, error);
|
|
}
|
|
}
|