From 89aabeef64029510be673b9e7eb86b470cced009 Mon Sep 17 00:00:00 2001 From: Kris De Volder Date: Tue, 24 Jan 2017 17:57:37 -0800 Subject: [PATCH] Improve some error messages. --- .../ide/vscode/commons/util/EnumValueParser.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) {