Add MDInvalidEmptyInputException
This commit is contained in:
parent
591a7bacc5
commit
80fd164439
26
exceptions/generic/MDInvalidEmptyInputException.php
Normal file
26
exceptions/generic/MDInvalidEmptyInputException.php
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<?PHP
|
||||||
|
/**
|
||||||
|
* This file contains an exception class for usage of fully empty inputs that should not be empty.
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||||
|
*/
|
||||||
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file contains an exception class for usage of fully empty inputs that should not be empty.
|
||||||
|
*/
|
||||||
|
final class MDInvalidEmptyInputException extends MDgenericInvalidInputsException {
|
||||||
|
/**
|
||||||
|
* Error message.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function errorMessage() {
|
||||||
|
//error message
|
||||||
|
$errorMsg = 'A value needs to be provided: ' . $this->getMessage();
|
||||||
|
return $errorMsg;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user