<?php
declare(strict_types=1);

namespace SafeTun\Backend\Exception;

final class ConfigException extends \RuntimeException
{
    /** @param list<string> $errors */
    public function __construct(private readonly array $errors)
    {
        parent::__construct($errors[0] ?? 'Invalid SafeTun configuration.');
    }

    /** @return list<string> */
    public function errors(): array
    {
        return $this->errors;
    }
}
