Add exception to be thrown when an invalid PGP key is submitted
This commit is contained in:
parent
a769e1ea35
commit
ded07b6597
26
exceptions/updates/MDPgpKeyIsInvalid.php
Normal file
26
exceptions/updates/MDPgpKeyIsInvalid.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?PHP
|
||||
/**
|
||||
* This file contains an exception class to be raised if a submitted PGP key
|
||||
* is invalid.
|
||||
*
|
||||
* @file
|
||||
*
|
||||
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||
*/
|
||||
declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* Custom exception class to be raised if a submitted PGP key is not valid.
|
||||
*/
|
||||
final class MDPgpKeyIsInvalid extends MDgenericInvalidInputsException {
|
||||
/**
|
||||
* Error message.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
return 'PGP key is invalid. ' . $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user