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

    https://github.com/apache/cloudstack/pull/41#discussion_r20488404
  
    --- 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 --
    
    Can you catch specific expected exceptions NPE and NFE?


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