federator/php/exceptions/invalidargument.php
2024-07-17 00:03:39 +02:00

34 lines
717 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;
/**
* Invalid Argument Exception
*/
class InvalidArgument extends Exception
{
/**
* constructor
* @param ?string $message optional error message
*/
public function __construct($message = null)
{
$this->message = ($message === null) ? "invalidargument" : $message;
}
/**
*
* {@inheritDoc}
* @see \Exceptions\Exception::getRetCode()
*/
public function getRetCode() : int
{
return 400;
}
}