2021-02-05 14:47:54 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace RetailCrm\ServiceBundle\Exceptions;
|
|
|
|
|
|
|
|
use InvalidArgumentException;
|
|
|
|
use Throwable;
|
|
|
|
|
|
|
|
class InvalidRequestArgumentException extends InvalidArgumentException
|
|
|
|
{
|
|
|
|
private $validateErrors;
|
|
|
|
|
2022-07-20 14:54:24 +03:00
|
|
|
public function __construct(string $message = "", int $code = 0, iterable $errors = [], Throwable $previous = null)
|
2021-02-05 14:47:54 +03:00
|
|
|
{
|
|
|
|
parent::__construct($message, $code, $previous);
|
|
|
|
|
|
|
|
$this->validateErrors = $errors;
|
|
|
|
}
|
|
|
|
|
2022-07-20 14:54:24 +03:00
|
|
|
public function getValidateErrors(): iterable
|
2021-02-05 14:47:54 +03:00
|
|
|
{
|
|
|
|
return $this->validateErrors;
|
|
|
|
}
|
|
|
|
}
|