<?php
declare(strict_types=1);

namespace App\Core\Exceptions;

class ValidationException extends \RuntimeException
{
    private array $errors;

    public function __construct(array $errors)
    {
        $this->errors = $errors;
        parent::__construct('Validation failed', 422);
    }

    public function errors(): array
    {
        return $this->errors;
    }
}
