[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15924010#comment-15924010
 ] 

ASF GitHub Bot commented on CLOUDSTACK-8855:
--------------------------------------------

Github user bvbharatk commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/837#discussion_r105881592
  
    --- Diff: engine/components-api/src/com/cloud/agent/AgentManager.java ---
    @@ -141,7 +142,7 @@
     
         public void pullAgentOutMaintenance(long hostId);
     
    -    boolean reconnect(long hostId);
    +    void reconnect(long hostId) throws CloudRuntimeException, 
AgentUnavailableException;
    --- End diff --
    
    @rafaelweingartner 
    What you said is correct in general. But in case of our code we can see 
places where we catch runtime exceptions and fail without giving out the actual 
reason. If we think the reason is of no use to the user, we should simply 
bubble them up and handle them accordingly in the top most calling method.  If 
we think the reason is not of importance to the user, we can simply log it and 
then send appropriate error messages.
    
    In the current code i wanted to force people to bubble up the runtime 
exceptions as well and then take a call at the top most calling method. This 
way if something fails we do not see multiple exception messages one for each 
level at which the failure occurred and with different error messages leading 
to confusion.


> Improve Error Message for Host Alert State
> ------------------------------------------
>
>                 Key: CLOUDSTACK-8855
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8855
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.6.0
>            Reporter: Bharat Kumar
>            Assignee: Bharat Kumar
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to