[z3-checkins] r35462 - z3/deliverance/DeliveranceDemo/trunk/ddemo

ianb at codespeak.net ianb at codespeak.net
Thu Dec 7 22:09:35 CET 2006


Author: ianb
Date: Thu Dec  7 22:09:33 2006
New Revision: 35462

Modified:
   z3/deliverance/DeliveranceDemo/trunk/ddemo/debuginterp.py
Log:
Deal with (not understood) case where format_error returns None

Modified: z3/deliverance/DeliveranceDemo/trunk/ddemo/debuginterp.py
==============================================================================
--- z3/deliverance/DeliveranceDemo/trunk/ddemo/debuginterp.py	(original)
+++ z3/deliverance/DeliveranceDemo/trunk/ddemo/debuginterp.py	Thu Dec  7 22:09:33 2006
@@ -9,6 +9,9 @@
 
     def format_error(self, message, rule, elts=None):
         error = super(PyRenderer, self).format_error(message, rule, elts)
+        if error is None:
+            error = etree.Element('div')
+            error.text = 'Error with no message (%s)' % message
         error_container = etree.Element('div')
         error_container.attrib['style'] = self.error_style
         if not current_environ.get('ddemo.has_errors'):
@@ -27,5 +30,6 @@
             error_container.append(container)
         error_container.append(error)
         return error_container
+
             
         


More information about the z3-checkins mailing list