# HG changeset patch # User Ludovic Chabant # Date 1438143830 25200 # Node ID 094bdf2f7c4cf3682a23bb14124e11d083f26535 # Parent 39175c48a4ae01c8a78e656924b69dafa26b6076 serve: Say what page a rendering error happened in. diff -r 39175c48a4ae -r 094bdf2f7c4c piecrust/rendering.py --- 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()