<?php

namespace App\Exceptions\Communications;

use RuntimeException;

class UnknownPlaceholderException extends RuntimeException
{
    public function __construct(
        public readonly array $unknownTokens,
        public readonly int $templateId,
    ) {
        parent::__construct(sprintf(
            'Template %d contains unknown placeholders: %s',
            $templateId,
            implode(', ', $unknownTokens),
        ));
    }
}
