cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvbharatk <...@git.apache.org>
Subject [GitHub] cloudstack pull request #837: CLOUDSTACK-8855 Improve Error Message for Host...
Date Wed, 15 Mar 2017 05:26:19 GMT
Github user bvbharatk commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/837#discussion_r106088086
  
    --- Diff: api/src/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java ---
    @@ -100,17 +103,18 @@ public Long getInstanceId() {
         @Override
         public void execute() {
             try {
    -            Host result = _resourceService.reconnectHost(this);
    -            if (result != null) {
    -                HostResponse response = _responseGenerator.createHostResponse(result);
    -                response.setResponseName(getCommandName());
    -                this.setResponseObject(response);
    -            } else {
    -                throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to
reconnect host");
    -            }
    -        } catch (Exception ex) {
    -            s_logger.warn("Exception: ", ex);
    -            throw new ServerApiException(ApiErrorCode.RESOURCE_UNAVAILABLE_ERROR, ex.getMessage());
    +            Host result =_resourceService.reconnectHost(this);
    --- End diff --
    
    @rafaelweingartner 
    reconnectHost now throws an exception instead of returning a null. So i have removed the
null check.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message