weizhouapache commented on code in PR #6571:
URL: https://github.com/apache/cloudstack/pull/6571#discussion_r951326350


##########
api/src/main/java/com/cloud/network/as/AutoScalePolicy.java:
##########
@@ -38,7 +36,7 @@ public static Action fromValue(String action) {
             } else if (action.equalsIgnoreCase("ScaleDown")) {
                 return ScaleDown;
             } else {
-                throw new InvalidParameterValueException("Unexpected AutoScale 
action : " + action);

Review Comment:
   @DaanHoogland 
   my thought is (1) InvalidParameterValueException is used for api parameters; 
(2) IllegalArgumentException is used for Enum methods, similar as 
`java.lang.Enum.valueOf()` which throws IllegalArgumentException if specified 
name cannot be found. 
   correct me if I am wrong.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to