Add two new exceptions for invalid list values

This commit is contained in:
Joshua Ramon Enslin 2023-01-23 22:15:25 +01:00
parent ac9b12618d
commit a2b0325f5b
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
2 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,26 @@
<?PHP
/**
* This file contains an exception class for usage of unaccepted color.
*
* @file
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
declare(strict_types = 1);
/**
* Custom exception class to be raised when trying to use a color that is not
* accepted by museum-digital.
*/
final class MDInvalidColor extends MDgenericInvalidInputsException {
/**
* Error message.
*
* @return string
*/
public function errorMessage() {
//error message
return 'The following color is not available: ' . $this->getMessage();
}
}

View File

@ -0,0 +1,26 @@
<?PHP
/**
* This file contains an exception class for usage of unaccepted object form.
*
* @file
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
declare(strict_types = 1);
/**
* Custom exception class to be raised when trying to use an object form that is not
* accepted by museum-digital.
*/
final class MDInvalidObjectForm extends MDgenericInvalidInputsException {
/**
* Error message.
*
* @return string
*/
public function errorMessage() {
//error message
return 'The following object form is not available: ' . $this->getMessage();
}
}