lzh3636 commented on a change in pull request #2553: Update inconsistent 
debugging info in catch block
URL: https://github.com/apache/cloudstack/pull/2553#discussion_r181084772
 
 

 ##########
 File path: 
api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java
 ##########
 @@ -254,7 +254,6 @@ public void create() {
                 setEntityUuid(result.getUuid());
             }
         } catch (NetworkRuleConflictException 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());
 
 Review comment:
   
https://github.com/apache/cloudstack/blob/893a88d225276e45f12f9490e6af2c94a81c2965/api/src/main/java/org/apache/cloudstack/api/ServerApiException.java
   
   I find that their are only two constructors in that Exception class:
   public ServerApiException(ApiErrorCode errorCode, String description)
   public ServerApiException(ApiErrorCode errorCode, String description, 
Throwable cause)
   
   Maybe it can be changed to 
   throw new ServerApiException(ApiErrorCode.NETWORK_RULE_CONFLICT_ERROR, 
ex.getMessage(), ex);
   

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