commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Sawyer <>
Subject [BeanUtils] Error Message Request
Date Wed, 26 Feb 2003 22:52:48 GMT
Can I request a change to the error handling in the PropertyUtils class

The last line of this class is a 

  writeMethod.invoke(bean, values);

in the setProperty() method.  This can fail with a 

  java.lang.IllegalArgumentException: argument type mismatch

and this error is then propogated out to the caller directly.  If this
setProperty() method is called from copyProperties(), then a developer
seeing this error has no idea which attribute on the class caused the
problem, and hence is at something of a loss to work out what's wrong,
especially when there are lots of attributes.

Can this exception be wrappered by another which a more detailed
message, that identifies which attribute caused the problem?  I haven't
just spent a couple of hours banging my head against this problem this
afternoon, honest...



View raw message