diff -r cecb4369fa42 -r b3499ff87178 PLCControler.py --- a/PLCControler.py Mon May 10 21:36:11 2010 +0200 +++ b/PLCControler.py Wed May 19 22:16:29 2010 +0200 @@ -2562,7 +2562,10 @@ self.Project = plcopen.project() for child in tree.childNodes: if child.nodeType == tree.ELEMENT_NODE and child.nodeName == "project": - self.Project.loadXMLTree(child, ["xmlns", "xmlns:xhtml", "xmlns:xsi", "xsi:schemaLocation"]) + try: + result = self.Project.loadXMLTree(child, ["xmlns", "xmlns:xhtml", "xmlns:xsi", "xsi:schemaLocation"]) + except ValueError, e: + return _("Project file syntax error:\n\n") + str(e) self.SetFilePath(filepath) self.Project.RefreshElementUsingTree() self.Project.RefreshDataTypeHierarchy()