MDErrorReporter/exceptions/generic/MDAccessDeniedException.php

19 lines
403 B
PHP

<?PHP
declare(strict_types = 1);
/**
* Custom exception class to throw when users attempt to access a page without necessary permissions.
*/
final class MDAccessDeniedException extends MDExpectedException {
/**
* Error message.
*
* @return string
*/
public function errorMessage() {
//error message
return 'Access denied: ' . $this->getMessage();
}
}