Mercurial > piecrust2
comparison 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 |
comparison
equal
deleted
inserted
replaced
714:e4dcef2d5640 | 715:a14371c5cda7 |
---|---|
223 if layout_result['pass_info'] is not None: | 223 if layout_result['pass_info'] is not None: |
224 rp.render_info[PASS_RENDERING] = RenderPassInfo._fromJson( | 224 rp.render_info[PASS_RENDERING] = RenderPassInfo._fromJson( |
225 layout_result['pass_info']) | 225 layout_result['pass_info']) |
226 return rp | 226 return rp |
227 except Exception as ex: | 227 except Exception as ex: |
228 if ctx.app.debug: | |
229 raise | |
228 logger.exception(ex) | 230 logger.exception(ex) |
229 page_rel_path = os.path.relpath(ctx.page.path, ctx.app.root_dir) | 231 page_rel_path = os.path.relpath(ctx.page.path, ctx.app.root_dir) |
230 raise Exception("Error rendering page: %s" % page_rel_path) from ex | 232 raise Exception("Error rendering page: %s" % page_rel_path) from ex |
231 finally: | 233 finally: |
232 ctx.setCurrentPass(PASS_NONE) | 234 ctx.setCurrentPass(PASS_NONE) |