public void run() { File dir = new File("../../../../github_data/megafon/cs-core/"); try { Nokia(new File(dir, "nokia/Master project CS SWAP_15.xml")); Huawei("УФ", new File(dir, "huawei/ПГ EKA + Ural v0 13 (2000).xml")); Huawei("ДвФ", new File(dir, "huawei/ПГ Khab+all cities V 1.6 (2000-2003).xml")); Huawei("СбФ", new File(dir, "huawei/ПГ Siberia all cities V 1.1 (2000-2003)_20161209.xml")); saveExcelPoject(new File(dir, "projects.xlsx")); saveStartProjects(new File(dir, "starts.csv")); } catch (IOException | ParserConfigurationException | SAXException e) { LOG.log(Level.SEVERE, "Исключение", e); } }
// Log the error private void log(int level, SAXParseException e) { int line = e.getLineNumber(); int col = e.getColumnNumber(); String publicId = e.getPublicId(); String systemId = e.getSystemId(); StringBuffer sb = new StringBuffer(); sb.append(e.getMessage()); if (line > 0 || col > 0) { sb.append(": line="); sb.append(line); sb.append(", col="); sb.append(col); } if (publicId != null || systemId != null) { sb.append(": publicId="); sb.append(publicId); sb.append(", systemId="); sb.append(systemId); } // Log the message log.log(level, sb.toString()); }