fixed uncaught exception dialog while displaying cought exception in log
authorEdouard Tisserant
Mon, 21 May 2012 17:53:50 +0200
changeset 741 382b2c848dac
parent 740 cee825fbe9b3
child 742 41a4a560406c
child 743 4645a3a398ad
fixed uncaught exception dialog while displaying cought exception in log
ConfigTreeNode.py
--- a/ConfigTreeNode.py	Mon May 21 16:40:57 2012 +0200
+++ b/ConfigTreeNode.py	Mon May 21 17:53:50 2012 +0200
@@ -547,7 +547,7 @@
                 self.MandatoryParams[1].loadXMLTree(basetree.childNodes[0])
                 basexmlfile.close()
             except Exception, exc:
-                self.GetCTRoot().logger.write_error(_("Couldn't load confnode base parameters %s :\n %s") % (CTNName, str(exc)))
+                self.GetCTRoot().logger.write_error(_("Couldn't load confnode base parameters %s :\n %s") % (CTNName, unicode(exc)))
                 self.GetCTRoot().logger.write_error(traceback.format_exc())
         
         # Get the xml tree
@@ -558,7 +558,7 @@
                 self.CTNParams[1].loadXMLTree(tree.childNodes[0])
                 xmlfile.close()
             except Exception, exc:
-                self.GetCTRoot().logger.write_error(_("Couldn't load confnode parameters %s :\n %s") % (CTNName, str(exc)))
+                self.GetCTRoot().logger.write_error(_("Couldn't load confnode parameters %s :\n %s") % (CTNName, unicode(exc)))
                 self.GetCTRoot().logger.write_error(traceback.format_exc())
         
     def LoadChildren(self):
@@ -570,6 +570,6 @@
                 try:
                     self.CTNAddChild(pname, ptype)
                 except Exception, exc:
-                    self.GetCTRoot().logger.write_error(_("Could not add child \"%s\", type %s :\n%s\n")%(pname, ptype, str(exc)))
+                    self.GetCTRoot().logger.write_error(_("Could not add child \"%s\", type %s :\n%s\n")%(pname, ptype, unicode(exc)))
                     self.GetCTRoot().logger.write_error(traceback.format_exc())