lzh3636 closed pull request #2547: CLOUDSTACK-10315 Inconsistent debugging info 
in catch block
URL: https://github.com/apache/cloudstack/pull/2547
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java
 
b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java
index ea0cb00301a..d4ea9a515a3 100644
--- 
a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java
+++ 
b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java
@@ -358,7 +358,7 @@ public void create() {
             setEntityId(result.getId());
             setEntityUuid(result.getUuid());
         } catch (NetworkRuleConflictException ex) {
-            s_logger.info("Network rule conflict: ", ex);
+            s_logger.info("Network rule conflict: " + ex.getMessage());
             s_logger.trace("Network Rule Conflict: ", ex);
             throw new 
ServerApiException(ApiErrorCode.NETWORK_RULE_CONFLICT_ERROR, ex.getMessage());
         }
diff --git 
a/plugins/hypervisors/simulator/src/main/java/com/cloud/ha/SimulatorFencer.java 
b/plugins/hypervisors/simulator/src/main/java/com/cloud/ha/SimulatorFencer.java
index 86c28715e0b..c776edfde35 100644
--- 
a/plugins/hypervisors/simulator/src/main/java/com/cloud/ha/SimulatorFencer.java
+++ 
b/plugins/hypervisors/simulator/src/main/java/com/cloud/ha/SimulatorFencer.java
@@ -90,12 +90,12 @@ public Boolean fenceOff(VirtualMachine vm, Host host) {
                     answer = (FenceAnswer)_agentMgr.send(h.getId(), fence);
                 } catch (AgentUnavailableException e) {
                     if (s_logger.isDebugEnabled()) {
-                        s_logger.debug("Moving on to the next host because " + 
h.toString() + " is unavailable");
+                        s_logger.debug("Moving on to the next host because " + 
h.toString() + " is unavailable", e);
                     }
                     continue;
                 } catch (OperationTimedoutException e) {
                     if (s_logger.isDebugEnabled()) {
-                        s_logger.debug("Moving on to the next host because " + 
h.toString() + " is unavailable");
+                        s_logger.debug("Moving on to the next host because " + 
h.toString() + " is unavailable", e);
                     }
                     continue;
                 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to