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] Any way to get more helpful error messages from BeanUtils.copyProperties?
Date Wed, 20 Aug 2003 17:00:16 GMT
On Wednesday, August 20, 2003, at 02:32 AM, __matthewHawthorne wrote:

<snip>

> Another idea I've had while using beanutils is the redundancy of having
> to catch IllegalAccessException, InvocationTargetException, and
> NoSuchMethodException for a lot of the method calls.  I use a small
> utility which delegates the call to beanutils, and if an exception
> occurs, wraps it in another exception (something like BeanException or
> ReflectionException).
>
> Would adding wrappers for the *Utils be useful, or are there frequent
> cases where users perform different actions based on the type of
> exception that occurs?  My actions for each type of exception are
> usually identical.

the major issue is backwards compatibility. there's a lot of code that 
(potentially) relies on beanutils preserving the current exception 
handling behaviour. the backwards compatibility issue only applies to the 
static utilities rather than the (unreleased) beans. it might be possible 
(but difficult) to alter the exception handling behaviour in the beans 
provided that it was possible to recreate the original behaviour when the 
bean is used through the static methods.

- robert


Mime
View raw message