/** * Handle an Exception thrown while rendering TypoScript * * @param string $typoScriptPath * @param \Exception $exception * @return string * @throws StopActionException|SecurityException */ public function handleRenderingException($typoScriptPath, \Exception $exception) { if ($exception instanceof StopActionException || $exception instanceof SecurityException) { throw $exception; } if ($exception instanceof Exceptions\RuntimeException) { $typoScriptPath = $exception->getTypoScriptPath(); $exception = $exception->getPrevious(); } if ($this->exceptionDisablesCache($typoScriptPath, $exception)) { $this->runtime->setEnableContentCache(false); } $referenceCode = $exception instanceof \Neos\Flow\Exception ? $exception->getReferenceCode() : null; return $this->handle($typoScriptPath, $exception, $referenceCode); }