diff --git a/Classes/Service/EelEvaluationService.php b/Classes/Service/EelEvaluationService.php index dec07db..2e53466 100644 --- a/Classes/Service/EelEvaluationService.php +++ b/Classes/Service/EelEvaluationService.php @@ -2,6 +2,7 @@ namespace Flowpack\NodeTemplates\Service; +use Neos\Eel\ParserException; use Neos\Flow\Annotations as Flow; use Neos\Eel\Utility as EelUtility; use Neos\Eel\CompilingEvaluator; @@ -44,8 +45,10 @@ public function evaluateEelExpression($expression, $contextVariables) $contextVariables = array_merge($this->defaultContextVariables, $contextVariables); try { return EelUtility::evaluateEelExpression($expression, $this->eelEvaluator, $contextVariables); + } catch (ParserException $parserException) { + throw new \RuntimeException('EEL Expression in NodeType template could not be parsed.', 1684788574212, $parserException); } catch (\Exception $exception) { - throw new \Exception(sprintf('EEL Expression "%s" in NodeType template caused an error.', $expression), 1684761760723, $exception); + throw new \RuntimeException(sprintf('EEL Expression "%s" in NodeType template caused an error.', $expression), 1684761760723, $exception); } } }