summaryrefslogtreecommitdiffstats
path: root/core/core-infrastructure/src
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-14 16:45:06 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-14 16:45:17 +0100
commita65e4772f4557a109917532b2d9c49680ce3bb15 (patch)
tree1669786f0b3ce82e005debc53218825d537841c8 /core/core-infrastructure/src
parent6d72a4a1e5d8678ecd8b093480ea9543089015b0 (diff)
Fix exception not logged or rethrown
Eclipse sonarlint does not check for exception dropping by default, it must be configured. This commit addresses exception dropping in apex. Change-Id: I406838990b3424c2912124b25d7326502cacc96c Issue-ID: POLICY-1034 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'core/core-infrastructure/src')
-rw-r--r--core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/xml/XPathReader.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/xml/XPathReader.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/xml/XPathReader.java
index bd2474339..08046c924 100644
--- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/xml/XPathReader.java
+++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/xml/XPathReader.java
@@ -92,7 +92,7 @@ public class XPathReader {
xpath = XPathFactory.newInstance().newXPath();
LOGGER.info("Initialized XPath reader");
} catch (final Exception ex) {
- LOGGER.error("Error parsing XML file/stream from XPath reading, reason :\n" + ex.getMessage());
+ LOGGER.error("Error parsing XML file/stream from XPath reading, reason :\n" + ex.getMessage(), ex);
}
}
@@ -108,7 +108,7 @@ public class XPathReader {
final XPathExpression xPathExpression = xpath.compile(expression);
return xPathExpression.evaluate(xmlDocument, returnType);
} catch (final XPathExpressionException ex) {
- LOGGER.error("Failed to read XML file for XPath processing, reason:\n" + ex.getMessage());
+ LOGGER.error("Failed to read XML file for XPath processing, reason:\n" + ex.getMessage(), ex);
return null;
}
}