Your IP : 3.145.2.151


Current Path : /var/www/admin_ftp_12/data/www/httpdocs/bitrix/modules/rest/lib/Exceptions/
Upload File :
Current File : /var/www/admin_ftp_12/data/www/httpdocs/bitrix/modules/rest/lib/Exceptions/ArgumentException.php

<?php

declare(strict_types=1);

namespace Bitrix\Rest\Exceptions;

use Bitrix\Rest\RestException;

class ArgumentException extends RestException
{
	protected string $parameter;

	public function __construct(string $message = '', string $parameter = '', \Exception $previous = null)
	{
		parent::__construct($message, self::ERROR_ARGUMENT,
			\CRestServer::STATUS_WRONG_REQUEST,
			$previous
		);

		$this->parameter = $parameter;

		$this->setAdditional([
			'argument' => $this->getParameter(),
		]);
	}

	public function getParameter(): string
	{
		return $this->parameter;
	}
}