/*******************************************************************************
- * Copyright (c) 2010, 2015 Ericsson
+ * Copyright (c) 2010, 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerFactoryConfigurationError;
if (file.canRead()) {
doc = db.parse(file);
if (!doc.getDocumentElement().getNodeName().equals(CUSTOM_TXT_TRACE_DEFINITION_ROOT_ELEMENT)) {
+ Activator.logError(String.format("Error saving CustomTxtTraceDefinition: path=%s is not a valid custom parser file", path)); //$NON-NLS-1$
return;
}
} else {
TmfTraceType.addCustomTraceType(CustomTxtTrace.class, categoryName, definitionName);
- } catch (ParserConfigurationException e) {
- Activator.logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$
- } catch (TransformerConfigurationException e) {
- Activator.logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$
- } catch (TransformerFactoryConfigurationError e) {
- Activator.logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$
- } catch (TransformerException e) {
- Activator.logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$
- } catch (IOException e) {
- Activator.logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$
- } catch (SAXException e) {
+ } catch (ParserConfigurationException | TransformerFactoryConfigurationError | TransformerException | IOException | SAXException e) {
Activator.logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$
}
}
} else if (nodeName.equals(OUTPUT_COLUMN_ELEMENT)) {
Element outputColumnElement = (Element) node;
OutputColumn outputColumn = new OutputColumn();
- outputColumn.name = checkNotNull(outputColumnElement.getAttribute(NAME_ATTRIBUTE));
+ outputColumn.name = outputColumnElement.getAttribute(NAME_ATTRIBUTE);
def.outputs.add(outputColumn);
}
}