Mercurial > piecrust2
changeset 864:5c5b85d4f17d
debug: Raise Jinja template exceptions the same way in both render passes.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 08 Jun 2017 23:31:45 -0700 |
parents | 01458d3b646b |
children | 1bb0d973dc69 |
files | piecrust/templating/jinjaengine.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/piecrust/templating/jinjaengine.py Thu Jun 08 23:30:42 2017 -0700 +++ b/piecrust/templating/jinjaengine.py Thu Jun 08 23:31:45 2017 -0700 @@ -72,6 +72,8 @@ except AbortedSourceUseError: raise except Exception as ex: + if self.app.debug: + raise msg = "Error rendering Jinja markup" rel_path = os.path.relpath(rendered_path, self.app.root_dir) raise TemplatingError(msg, rel_path) from ex