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

TemplateSyntaxError from included template has source #1112

Merged
merged 1 commit into from Dec 3, 2019

Conversation

davidism
Copy link
Member

@davidism davidism commented Dec 3, 2019

fixes #457

Rendering the included template caught, processed, and re-raised the TemplateSyntaxError, which was then caught and processed again in the top-level render call. Now prevent such tracebacks from being faked a second time.

This also fixes an issue introduced by #1110 that omitted the other template frames and only showed the template with the syntax error.

@davidism davidism added this to the 2.11.0 milestone Dec 3, 2019
@davidism davidism merged commit 28f12c0 into master Dec 3, 2019
@davidism davidism deleted the include-syntax-error-source branch December 3, 2019 21:26
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

jinja2.exceptions.TemplateSyntaxError.source is empty for included files
1 participant