improved error handling for illegal property values, e.g.
1. <property name="classLoader" value=""/>. Is it by accident or by design that bean properties like this cannot be set because they aren't "simple" types? 2. <property name="tabWidth" value="eight"/>
This commit is contained in:
parent
e77eef412f
commit
8ec36bc770
|
|
@ -182,6 +182,17 @@ public class AutomaticBean implements Configurable, Contextualizable
|
|||
"cannot access " + key + " in "
|
||||
+ this.getClass().getName());
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
throw new CheckstyleException(
|
||||
"illegal value '" + value + "' for property '" + key
|
||||
+ "' of module " + aConfiguration.getName());
|
||||
}
|
||||
catch (ConversionException e) {
|
||||
throw new CheckstyleException(
|
||||
"illegal value '" + value + "' for property '" + key
|
||||
+ "' of module " + aConfiguration.getName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
finishLocalSetup();
|
||||
|
|
@ -222,6 +233,16 @@ public class AutomaticBean implements Configurable, Contextualizable
|
|||
"cannot access " + key + " in "
|
||||
+ this.getClass().getName());
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
throw new CheckstyleException(
|
||||
"illegal value '" + value + "' for property '" + key
|
||||
+ "' of bean " + this.getClass().getName());
|
||||
}
|
||||
catch (ConversionException e) {
|
||||
throw new CheckstyleException(
|
||||
"illegal value '" + value + "' for property '" + key
|
||||
+ "' of bean " + this.getClass().getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue