<?php

namespace WPUltimateSecurity\UltimateSecurity\Infrastructure\Container;

use Exception;

/**
 * Service Not Found Exception
 *
 * Thrown when a requested service is not found in the container.
 *
 * @package WPUltimateSecurity\UltimateSecurity\Infrastructure\Container
 * @since 2.0.0
 */
class ServiceNotFoundException extends Exception
{
    /**
     * Create a new exception for a missing service.
     *
     * @param string $id The service identifier that was not found.
     */
    public function __construct(string $id)
    {
        parent::__construct(
            sprintf(
                'Service "%s" not found in container. Make sure it is registered before attempting to resolve it.',
                $id
            )
        );
    }
}
