<?php

declare(strict_types=1);

namespace ImovelZapAi\Publishing\Domain\Exceptions;

use ImovelZapAi\Publishing\Application\Data\XmlValidationResult;

final class InvalidListingDataFeedXmlException extends \RuntimeException
{
    public function __construct(
        public readonly XmlValidationResult $validation,
    ) {
        parent::__construct($validation->firstError() ?? 'XML VRSync inválido.');
    }
}
