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:
Rick Giles 2002-12-28 12:19:26 +00:00
parent e77eef412f
commit 8ec36bc770
1 changed files with 21 additions and 0 deletions

View File

@ -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());
}
}
}