summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsaac Manuel Raj <isaac.manuelraj@huawei.com>2019-04-19 16:24:02 +0530
committerIsaac Manuel Raj <isaac.manuelraj@huawei.com>2019-04-19 16:24:02 +0530
commit569a70b9a1a92db798ca88282fb7a49b1e22eb7a (patch)
tree334fe62bd063f00b29fa52117dc38ac40cd52972
parent3e9284886aeaefd749a8a09060490f4e3007fe8b (diff)
Added logging for exception handling.
Added logging for exception. Issue-ID: SO-1490 Change-Id: I5062d422c1deb44c102a6f205be24c99a40a8627 Signed-off-by: Isaac Manuel Raj <isaac.manuelraj@huawei.com>
-rw-r--r--openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java
index d43e6c9..27bbe87 100644
--- a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java
+++ b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java
@@ -168,12 +168,15 @@ public class HttpClientConnector implements OpenStackClientConnector {
catch (HttpResponseException e) {
// What exactly does this mean? It does not appear to get thrown for
// non-2XX responses as documented.
+ logger.error ("HttpResponseException: " +e.getMessage());
throw new OpenStackResponseException(e.getMessage(), e.getStatusCode());
}
catch (UnknownHostException e) {
+ logger.error ("Unknown Host: " +e.getMessage());
throw new OpenStackConnectException("Unknown Host: " + e.getMessage());
}
catch (IOException e) {
+ logger.error ("IOException: " +e.getMessage());
// Catch all other IOExceptions and throw as OpenStackConnectException
throw new OpenStackConnectException(e.getMessage());
}