# HG changeset patch # User Ludovic Chabant # Date 1496989905 25200 # Node ID 5c5b85d4f17dd08ffab61cc5615034e18ace59d3 # Parent 01458d3b646b2ab02654fbe7f13b9fe9d6ac36da debug: Raise Jinja template exceptions the same way in both render passes. diff -r 01458d3b646b -r 5c5b85d4f17d piecrust/templating/jinjaengine.py --- 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