<?php
/**
 * Thrown when notifier config validation fails.
 *
 * @package Backreload\Notifiers
 */

namespace Backreload\Notifiers;

if ( ! defined( 'ABSPATH' ) ) { exit; }

class NotifierValidationException extends \RuntimeException {

	/** @var array<string,string> */
	private array $errors;

	public function __construct( array $errors, string $message = 'Notifier validation failed' ) {
		parent::__construct( $message );
		$this->errors = $errors;
	}

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