Add new exception MDInputTooLongException for overly long input strings
This commit is contained in:
parent
6326a6dacf
commit
591a7bacc5
20
exceptions/generic/MDInputTooLongException.php
Normal file
20
exceptions/generic/MDInputTooLongException.php
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?PHP
|
||||||
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Exception thrown in case of inputs longer than the allowed length of a
|
||||||
|
* field's contents in the DB.
|
||||||
|
*/
|
||||||
|
final class MDInputTooLongException extends MDgenericInvalidInputsException {
|
||||||
|
/**
|
||||||
|
* Error message.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function errorMessage() {
|
||||||
|
//error message
|
||||||
|
$errorMsg = 'Input string is too long';
|
||||||
|
return $errorMsg;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user