37 lines
734 B
PHP
37 lines
734 B
PHP
<?php
|
|
/**
|
|
* SPDX-FileCopyrightText: 2024 Sascha Nitsch (grumpydeveloper) https://contentnation.net/@grumpydevelop
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*
|
|
* @author Sascha Nitsch (grumpydeveloper)
|
|
*/
|
|
|
|
namespace Federator\Exceptions;
|
|
|
|
/**
|
|
* Permission denied exception
|
|
*/
|
|
class PermissionDenied extends Exception
|
|
{
|
|
/**
|
|
* constructor
|
|
*
|
|
* @param ?string $message
|
|
* error message
|
|
*/
|
|
public function __construct($message = null)
|
|
{
|
|
$this->message = ($message === null) ? "permissiondenied" : $message;
|
|
}
|
|
|
|
/**
|
|
*
|
|
* {@inheritdoc}
|
|
* @see \Exceptions\Exception::getRetCode()
|
|
*/
|
|
public function getRetCode() : int
|
|
{
|
|
return 403;
|
|
}
|
|
}
|