Mercurial > piecrust2
diff 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 |
line wrap: on
line diff
--- a/piecrust/rendering.py Tue Jul 28 21:23:11 2015 -0700 +++ b/piecrust/rendering.py Tue Jul 28 21:23:50 2015 -0700 @@ -278,6 +278,9 @@ rp.render_info[PASS_RENDERING] = RenderPassInfo._fromJson( layout_result['pass_info']) return rp + except Exception as ex: + page_rel_path = os.path.relpath(page.path, ctx.app.root_dir) + raise Exception("Error rendering page: %s" % page_rel_path) from ex finally: ctx.setCurrentPass(PASS_NONE) eis.popPage()