Add MDExpectedException as a parent class for MDAccessDeniedException,

make it expected
This commit is contained in:
2020-08-06 10:33:20 +02:00
committed by Stefan Rohde-Enslin
parent db5692cec0
commit ac9cda19fc
3 changed files with 23 additions and 1 deletions

View File

@ -4,7 +4,7 @@ declare(strict_types = 1);
/**
* Custom exception class for invalid page parameters.
*/
class MDAccessDeniedException extends Exception {
class MDAccessDeniedException extends MDExpectedException {
/**
* Error message.

View File

@ -0,0 +1,21 @@
<?PHP
declare(strict_types = 1);
/**
* Custom exception class for invalid page parameters.
*/
class MDExpectedException extends Exception {
/**
* Error message.
*
* @return string
*/
public function errorMessage() {
//error message
$errorMsg = 'Parameter: <b>' . $this->getMessage() . '</b> is not a valid, numeric values.';
return $errorMsg;
}
}