Thanks for DynaBean and all the other great Commons code.
WrapDynaBean gives a misleading error message: "Property foo has no read method" when actually there is a getFoo() method, but it throws an exception.
WrapDynaBean:
public Object get(String name) {
Object value = null;
try {
value = PropertyUtils.getSimpleProperty(instance, name);
} catch (Throwable t) {
throw new IllegalArgumentException
("Property '" + name + "' has no read method");
}Here's an example of the "getFoo()" throwing an exception. I'm using XmlBeans to get a data value which is invalid:
org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException
at org.apache.xmlbeans.impl.values.JavaIntHolder.set_text(JavaIntHolder.java:42)
at org.apache.xmlbeans.impl.values.XmlObjectBase.update_from_wscanon_text(XmlObjectBase.java:1068)
at org.apache.xmlbeans.impl.values.XmlObjectBase.check_dated(XmlObjectBase.java:1206)
at org.apache.xmlbeans.impl.values.JavaIntHolder.intValue(JavaIntHolder.java:52)
at org.apache.xmlbeans.impl.values.XmlObjectBase.getIntValue(XmlObjectBase.java:1424)
But as you can see, get() completely masks the real error.
Thanks.
Dave Briccetti Lafayette, California
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
