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

    https://github.com/apache/cloudstack/pull/41#discussion_r20489860
  
    --- Diff: server/src/com/cloud/configuration/ConfigurationManagerImpl.java 
---
    @@ -725,6 +725,21 @@ private String validateConfigurationValue(String name, 
String value, String scop
                 type = c.getType();
             }
     
    +        String errMsg = null;
    +        try {
    +            if (type.equals(Integer.class)) {
    +                errMsg = "There was error in trying to parse value: " + 
value + ". Please enter a valid integer value for parameter " + name;
    +                Integer.parseInt(value);
    +            } else if (type.equals(Float.class)) {
    +                errMsg = "There was error in trying to parse value: " + 
value + ". Please enter a valid float value for parameter " + name;
    +                Float.parseFloat(value);
    +            }
    +        } catch (Exception e) {
    --- End diff --
    
    What value will be added by catching specific exceptions?
    In the end user only wants to know whether the value is valid or not. 
he/she is not concerned with what type of exception he is getting.



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

Reply via email to