diff piecrust/rendering.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 ab5c6a8ae90a
children a066f4ac9094
line wrap: on
line diff
--- a/piecrust/rendering.py	Thu May 26 20:44:44 2016 -0700
+++ b/piecrust/rendering.py	Thu May 26 20:45:16 2016 -0700
@@ -225,6 +225,8 @@
                 layout_result['pass_info'])
         return rp
     except Exception as ex:
+        if ctx.app.debug:
+            raise
         logger.exception(ex)
         page_rel_path = os.path.relpath(ctx.page.path, ctx.app.root_dir)
         raise Exception("Error rendering page: %s" % page_rel_path) from ex