diff 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
line wrap: on
line diff
--- a/piecrust/templating/jinjaengine.py	Thu May 26 20:44:44 2016 -0700
+++ b/piecrust/templating/jinjaengine.py	Thu May 26 20:45:16 2016 -0700
@@ -58,6 +58,8 @@
         except AbortedSourceUseError:
             raise
         except Exception as ex:
+            if self.app.debug:
+                raise
             msg = "Error rendering Jinja markup"
             rel_path = os.path.relpath(path, self.app.root_dir)
             raise TemplatingError(msg, rel_path) from ex