Neos.Neos/Classes/Fusion/ExceptionHandlers/NodeWrappingHandler.php
protected function handle($fusionPath, \Exception $exception, $referenceCode)
    {
        $handler = new ContextDependentHandler();
        $handler->setRuntime($this->runtime);
        $output = $handler->handleRenderingException($fusionPath, $exception);

        $currentContext = $this->getRuntime()->getCurrentContext();
        if (isset($currentContext['node'])) {
            /** @var NodeInterface $node */
            $node = $currentContext['node'];
            $applicationContext = $this->environment->getContext();
            if ($applicationContext->isProduction() && $this->privilegeManager->isPrivilegeTargetGranted('Neos.Neos:Backend.GeneralAccess') && $node->getContext()->getWorkspaceName() !== 'live') {
                $output = '<div class="neos-rendering-exception"><div class="neos-rendering-exception-title">Failed to render element' . $output . '</div></div>';
            }

            return $this->contentElementWrappingService->wrapContentObject($node, $output, $fusionPath);
        }

        return $output;
    }
protected function handle($fusionPath, \Exception $exception, $referenceCode)
    {
        $handler = new ContextDependentHandler();
        $handler->setRuntime($this->runtime);
        $output = $handler->handleRenderingException($fusionPath, $exception);

        $currentContext = $this->getRuntime()->getCurrentContext();
        if (isset($currentContext['node'])) {
            /** @var NodeInterface $node */
            $node = $currentContext['node'];
            $applicationContext = $this->environment->getContext();
            if ($applicationContext->isProduction() && $this->privilegeManager->isPrivilegeTargetGranted('Neos.Neos:Backend.GeneralAccess') && $node->getContext()->getWorkspaceName() !== 'live') {
                $output = '<div class="neos-rendering-exception"><div class="neos-rendering-exception-title">Failed to render element' . $output . '</div></div>';
            }

            return $this->contentElementWrappingService->wrapContentObject($node, $output, $fusionPath);
        }

        return $output;
    }
protected function handle ( $ fusionPath , \ Exception $ exception , $ referenceCode ) { $ handler = new ContextDependentHandler ( ) ; $ handler -> setRuntime ( $ this -> runtime ) ; $ output = $ handler -> handleRenderingException ( $ fusionPath , $ exception ) ; $ currentContext = $ this -> getRuntime ( ) -> getCurrentContext ( ) ; if ( isset ( $ currentContext [ 'node' ] ) ) { /** @var NodeInterface $node */ $ node = $ currentContext [ 'node' ] ; $ applicationContext = $ this -> environment -> getContext ( ) ; if ( $ applicationContext -> isProduction ( ) && $ this -> privilegeManager -> isPrivilegeTargetGranted ( 'Neos.Neos:Backend.GeneralAccess' ) && $ node -> getContext ( ) -> getWorkspaceName ( ) !== 'live' ) { $ output = '<div class="neos-rendering-exception"><div class="neos-rendering-exception-title">Failed to render element' . $ output . '</div></div>' ; } return $ this -> contentElementWrappingService -> wrapContentObject ( $ node , $ output , $ fusionPath ) ; } return $ output ; }
renders the exception to nice html content element to display, edit, remove, ...

@param string $fusionPath - path causing the exception
@param \Exception $exception - exception to handle
@param integer $referenceCode - might be unset
@return string
renders the exception to nice html content element to display edit remove ...