<?php

declare(strict_types=1);

namespace Plugin\tnt_mcp\src\Mcp\Backend;

use RuntimeException;

/**
 * The controller class an `adminIo` catalog entry names may not be invoked. Three distinct causes,
 * one exception, because to a caller they are the same answer — "not through this door":
 *
 * 1. the class does not exist (a catalog typo, or a class a shop upgrade removed),
 * 2. it is not an `AbstractBackendController` subclass — an `adminIo` entry is not a way to
 *    construct arbitrary classes with five injected shop services,
 * 3. it is on {@see ControllerLocator::BLOCKED} (or extends something on it).
 *
 * (3) is the reason this exists at all: the route blocklist would be worthless if naming a class
 * directly bypassed it. The check is a class check, not a slug check, and `is_a()` covers subclasses
 * so a plugin cannot re-expose a blocked controller by extending it.
 */
final class BlockedControllerException extends RuntimeException
{
}
