<?php

namespace App\Exceptions;

use App\Models\Feed;
use App\Models\PlatformChannel;

class RoutingMismatchException extends RoutingException
{
    public function __construct(Feed $feed, PlatformChannel $channel)
    {
        $message = sprintf(
            "Language mismatch: Feed '%s' is in '%s' but channel '%s' is set to '%s'. Feed and channel languages must match for proper content routing.",
            $feed->name,
            $feed->language,
            $channel->name,
            $channel->language
        );

        parent::__construct($message);
    }
}
