Add exceptions from musdb
This commit is contained in:
parent
40cbf77db9
commit
9f45e60658
23
exceptions/updates/MDDuplicateLinkException.php
Normal file
23
exceptions/updates/MDDuplicateLinkException.php
Normal 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;
|
||||
|
||||
}
|
||||
|
||||
}
|
22
exceptions/updates/MDwriteAccessDeniedException.php
Normal file
22
exceptions/updates/MDwriteAccessDeniedException.php
Normal 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;
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user