Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Better exception handling when eel fails #34

Closed
mhsdesign opened this issue May 16, 2023 · 0 comments · Fixed by #39
Closed

FEATURE: Better exception handling when eel fails #34

mhsdesign opened this issue May 16, 2023 · 0 comments · Fixed by #39

Comments

@mhsdesign
Copy link
Contributor

mhsdesign commented May 16, 2023

Currently if you use a malformed expression, or the expression yields an error its hard to debug, in which property path the exception was caused.

ideally an exception would look like:

expression in template path: `childNodes.bar.properties.someProperty` threw Error: ...

it a bit tedious but a simple implementation could look like:

                try {
                    $propertyValue = $this->eelEvaluationService->evaluateEelExpression($propertyValue, $context);
                } catch (\Exception $exception) {
                    throw new \Exception(sprintf('Property "%s": "%s" could not be evaluated.', $propertyName, $propertyValue), 1684257493838, $exception);
                }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant