You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/08/22 11:30:01 UTC
[GitHub] [cloudstack] weizhouapache commented on a diff in pull request #6571: [WIP] VM Autoscaling with virtual router
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org