commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <martin.coo...@tumbleweed.com>
Subject [Digester] Asymmetry between ObjectCreateRule and FactoryCreateRule
Date Mon, 04 Mar 2002 03:46:37 GMT
I noticed an asymmetry between the way ObjectCreateRule and
FactoryCreateRule handle exceptions.

ObjectCreateRule.begin() does not attempt to catch the exceptions which
might be thrown from loadClass() or newInstance(). It simply allows them to
blow out of begin(), so that they may be handled elsewhere.

FactoryCreateRule.begin() calls the createObject() method, which has no
declared exceptions. Therefore, an implementation of createObject() must
handle the same exceptions which do not need to be handled in
ObjectCreateRule.begin().

Is this asymmetry intentional, or perhaps an oversight in
ObjectCreationFactory?

Thanks!

--
Martin Cooper



--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message