Mercurial > piecrust2
comparison piecrust/rendering.py @ 522:094bdf2f7c4c
serve: Say what page a rendering error happened in.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 28 Jul 2015 21:23:50 -0700 |
parents | bab91fcef741 |
children | bc23465ed1b4 |
comparison
equal
deleted
inserted
replaced
521:39175c48a4ae | 522:094bdf2f7c4c |
---|---|
276 render_result['pass_info'])} | 276 render_result['pass_info'])} |
277 if layout_result['pass_info'] is not None: | 277 if layout_result['pass_info'] is not None: |
278 rp.render_info[PASS_RENDERING] = RenderPassInfo._fromJson( | 278 rp.render_info[PASS_RENDERING] = RenderPassInfo._fromJson( |
279 layout_result['pass_info']) | 279 layout_result['pass_info']) |
280 return rp | 280 return rp |
281 except Exception as ex: | |
282 page_rel_path = os.path.relpath(page.path, ctx.app.root_dir) | |
283 raise Exception("Error rendering page: %s" % page_rel_path) from ex | |
281 finally: | 284 finally: |
282 ctx.setCurrentPass(PASS_NONE) | 285 ctx.setCurrentPass(PASS_NONE) |
283 eis.popPage() | 286 eis.popPage() |
284 | 287 |
285 | 288 |