Mercurial > piecrust2
comparison piecrust/templating/jinjaengine.py @ 715:a14371c5cda7
debug: Pass the exceptions untouched when debugging.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 26 May 2016 20:45:16 -0700 |
parents | cbd5cdec0695 |
children | f0a3af3fbea2 |
comparison
equal
deleted
inserted
replaced
714:e4dcef2d5640 | 715:a14371c5cda7 |
---|---|
56 except TemplateSyntaxError as tse: | 56 except TemplateSyntaxError as tse: |
57 raise self._getTemplatingError(tse) | 57 raise self._getTemplatingError(tse) |
58 except AbortedSourceUseError: | 58 except AbortedSourceUseError: |
59 raise | 59 raise |
60 except Exception as ex: | 60 except Exception as ex: |
61 if self.app.debug: | |
62 raise | |
61 msg = "Error rendering Jinja markup" | 63 msg = "Error rendering Jinja markup" |
62 rel_path = os.path.relpath(path, self.app.root_dir) | 64 rel_path = os.path.relpath(path, self.app.root_dir) |
63 raise TemplatingError(msg, rel_path) from ex | 65 raise TemplatingError(msg, rel_path) from ex |
64 | 66 |
65 def renderFile(self, paths, data): | 67 def renderFile(self, paths, data): |