diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2019-04-19 11:18:11 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-04-19 11:18:11 +0000 |
commit | ebfb21b534d68648386be5322f62fbe616670b3a (patch) | |
tree | 0c2039a5180b5e621686179e2e87bc9adbcbb78c | |
parent | 19db86afe558e9f3cde3b307be97b80f7453fdbf (diff) | |
parent | 569a70b9a1a92db798ca88282fb7a49b1e22eb7a (diff) |
Merge "Added logging for exception handling."
-rw-r--r-- | openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java | 3 |
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()); } |