Add new exceptions to be thrown when encountering distinctly typed

strings
This commit is contained in:
Joshua Ramon Enslin 2023-11-13 00:10:10 +01:00
parent 15f2645514
commit f7f87a58c9
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
3 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,27 @@
<?PHP
/**
* This file contains an exception class to be used when trying to enter
* a vocabulary entry in the wrong vocabulary.
*
* @file
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
declare(strict_types = 1);
/**
* This file contains an exception class to be used when trying to enter
* a vocabulary entry in the wrong vocabulary.
*/
final class MDNewVocabEntryIsStrictlyTypedAsActor extends MDgenericInvalidInputsException {
/**
* Error message.
*
* @return string
*/
public function errorMessage() {
//error message
return 'The entered term is known to always represent an actor entry. ' . $this->getMessage();
}
}

View File

@ -0,0 +1,27 @@
<?PHP
/**
* This file contains an exception class to be used when trying to enter
* a vocabulary entry in the wrong vocabulary.
*
* @file
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
declare(strict_types = 1);
/**
* This file contains an exception class to be used when trying to enter
* a vocabulary entry in the wrong vocabulary.
*/
final class MDNewVocabEntryIsStrictlyTypedAsPlace extends MDgenericInvalidInputsException {
/**
* Error message.
*
* @return string
*/
public function errorMessage() {
//error message
return 'The entered term is known to always represent a place entry. ' . $this->getMessage();
}
}

View File

@ -0,0 +1,27 @@
<?PHP
/**
* This file contains an exception class to be used when trying to enter
* a vocabulary entry in the wrong vocabulary.
*
* @file
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
declare(strict_types = 1);
/**
* This file contains an exception class to be used when trying to enter
* a vocabulary entry in the wrong vocabulary.
*/
final class MDNewVocabEntryIsStrictlyTypedAsTime extends MDgenericInvalidInputsException {
/**
* Error message.
*
* @return string
*/
public function errorMessage() {
//error message
return 'The entered term is known to always represent a time entry. ' . $this->getMessage();
}
}