Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
32590
Description
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
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.