public function renderBlock(array $context, Block $block, array $parameters = [], ?string $viewContext = null): string
    {
        try {
            return $this->renderer->renderValue(
                $block,
                $this->getViewContext($context, $viewContext),
                [
                    'twig_template' => $context['twig_template'] ?? null,
                ] + $parameters
            );
        } catch (Throwable $t) {
            $message = sprintf('Error rendering a block with ID "%s"', $block->getId());

            $this->errorHandler->handleError($t, $message);
        }

        return '';
    }