diff --git a/vscode-extensions/commons/commons-util/src/main/java/org/springframework/ide/vscode/commons/util/EnumValueParser.java b/vscode-extensions/commons/commons-util/src/main/java/org/springframework/ide/vscode/commons/util/EnumValueParser.java index 70b20d49a..b96660560 100644 --- a/vscode-extensions/commons/commons-util/src/main/java/org/springframework/ide/vscode/commons/util/EnumValueParser.java +++ b/vscode-extensions/commons/commons-util/src/main/java/org/springframework/ide/vscode/commons/util/EnumValueParser.java @@ -44,6 +44,7 @@ public class EnumValueParser implements ValueParser { this.values = values; } + @Override public Object parse(String str) throws Exception { // IMPORTANT: check the text FIRST before fetching values // from the hints provider, as the hints provider may be expensive when @@ -71,11 +72,11 @@ public class EnumValueParser implements ValueParser { } protected Exception errorOnParse(String message) { - return new IllegalArgumentException(message); + return new ValueParseException(message); } protected Exception errorOnBlank(String message) { - return new IllegalArgumentException(message); + return new ValueParseException(message); } private static Provider provider(T values) {