cloudstack-dev mailing list archives

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

    https://github.com/apache/cloudstack/pull/837#discussion_r105723444
  
    --- 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 --
    
    Before the `result` was checked for `null`; can the method `_resourceService.reconnectHost(this)`
return null?


---
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