engelsystem/src/Http/Exceptions/ValidationException.php

28 lines
562 B
PHP
Raw Normal View History

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(
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;
}
}