Add exceptions from musdb

This commit is contained in:
Joshua Ramon Enslin 2020-07-25 23:53:19 +02:00 committed by Stefan Rohde-Enslin
parent 40cbf77db9
commit 9f45e60658
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,23 @@
<?PHP
declare(strict_types = 1);
/**
* Exception thrown in case an erroneously duplicate link is to be entered in a
* linking table.
*/
class MDDuplicateLinkException extends Exception {
/**
* Error message.
*
* @return string
*/
public function errorMessage() {
//error message
$errorMsg = 'Duplicate link exception: ' . $this->getMessage() . '.';
return $errorMsg;
}
}

View File

@ -0,0 +1,22 @@
<?PHP
declare(strict_types = 1);
/**
* Exception thrown in case the main entity of a page (e.g. an object, an institution etc.)
* are not set public.
*/
class MDwriteAccessDeniedException extends Exception {
/**
* Error message.
*
* @return string
*/
public function errorMessage() {
//error message
$errorMsg = 'You have no permission to write this.';
return $errorMsg;
}
}