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.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---