<?php
/**
 * Schedule validation failure.
 *
 * @package ScheduledChanges
 */

namespace ScheduledChanges\Scheduler;

use ScheduledChanges\Validation\ValidationReport;

/**
 * Carries the blocking validation report back to UI, REST, or CLI callers.
 */
final class ScheduleValidationException extends SchedulingException {
	private ValidationReport $report;
	public function __construct( ValidationReport $report ) {
		$this->report = $report;
		parent::__construct( 'Launch version cannot be scheduled because validation failed.' );
	}

	public function report(): ValidationReport {
		return $this->report;
	}
}
