2019-07-09 21:43:18 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Engelsystem\Http\Exceptions;
|
|
|
|
|
|
|
|
use Engelsystem\Http\Validation\Validator;
|
|
|
|
use RuntimeException;
|
|
|
|
use Throwable;
|
|
|
|
|
|
|
|
class ValidationException extends RuntimeException
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @param Throwable|null $previous
|
|
|
|
*/
|
|
|
|
public function __construct(
|
2022-12-15 19:57:02 +01:00
|
|
|
protected Validator $validator,
|
2019-07-09 21:43:18 +02:00
|
|
|
string $message = '',
|
|
|
|
int $code = 0,
|
|
|
|
Throwable $previous = null
|
|
|
|
) {
|
|
|
|
parent::__construct($message, $code, $previous);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getValidator(): Validator
|
|
|
|
{
|
|
|
|
return $this->validator;
|
|
|
|
}
|
|
|
|
}
|