Commit b3e15b29 authored by Andrey Filippov's avatar Andrey Filippov

Made it tolerate emty TSL files (created by accidental launch of xml file in the editor)

parent 82ff37ec
......@@ -472,7 +472,13 @@ public class XMLConfig extends Config {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(configFile);
Document document;
try {
document = builder.parse(configFile);
} catch(SAXException e){
System.out.println("\n====== Problem parsing '" + configFile + "' - is it empty? =====\n");
return;
}
currentConfigFileName = configFile.getAbsolutePath();
findRootNode(document);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment