Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve jinja2 templating error report for TemplateError (#783)
jinja2.TemplateError does not include the template line number which can be of great help when troubleshooting errors like 'foo' has no attribute 'bar' The line number can however be inferred from the stack trace. This was inspired by https://github.com/saltstack/salt/blob/master/salt/utils/templates.py Example output: Jsonnet error: failed to compile test/main.jsonnet: RUNTIME ERROR: Jsonnet jinja2 failed to render templates/abc.j2: Jinja2 TemplateError: 'foo' has no attribute 'bar', at templates/abc.j2:240 Signed-off-by: David Verbeiren <[email protected]>
- Loading branch information