commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: [BeanUtils] Error Message Request
Date Tue, 04 Mar 2003 19:33:06 GMT
hi tim

i've now committed a fix for this. IllegalArgumentException from method 
invocations should now be caught and rethrown with a better message.

- robert

On Wednesday, February 26, 2003, at 10:52 PM, Tim Sawyer wrote:

> Can I request a change to the error handling in the PropertyUtils class
> please?
>
> 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...
>
> Cheers,
>
> Tim.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


Mime
View raw message