changeset 1205:92d0a2b785fd

pages: show rendered html on failed renderAndUpdate
author Goffi <goffi@goffi.org>
date Sun, 14 Jul 2019 17:18:48 +0200
parents a2df53dfbf46
children d2e2bf14f2e2
files libervia/server/pages.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/server/pages.py	Sun Jul 14 14:48:31 2019 +0200
+++ b/libervia/server/pages.py	Sun Jul 14 17:18:48 2019 +0200
@@ -1526,7 +1526,12 @@
         template_data = request.template_data.copy()
         template_data.update(template_data_update)
         html = self.renderPartial(request, template, template_data)
-        request.sendData(u"dom", selectors=selectors, update_type=update_type, html=html)
+        try:
+            request.sendData(
+                u"dom", selectors=selectors, update_type=update_type, html=html)
+        except Exception as e:
+            log.error(u"Can't renderAndUpdate, html was: {html}".format(html=html))
+            raise e
 
     def renderPage(self, request, skip_parse_url=False):
         """Main method to handle the workflow of a LiberviaPage"""