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:38:42 +03:00
|
|
|
public function __construct(string $message = "", int $code = 0, array $errors = [], Throwable $previous = null)
|
2021-02-05 14:47:54 +03:00
|
|
|
{
|
|
|
|
parent::__construct($message, $code, $previous);
|
|
|
|
|
|
|
|
$this->validateErrors = $errors;
|
|
|
|
}
|
|
|
|
|
2022-07-20 14:38:42 +03:00
|
|
|
public function getValidateErrors(): array
|
2021-02-05 14:47:54 +03:00
|
|
|
{
|
|
|
|
return $this->validateErrors;
|
|
|
|
}
|
|
|
|
}
|