On Fri, 15 Aug 2003, Jeremy Boynes wrote:
> Got lost in the noise...
>
> One thing, I am curious about this fragment:
> try {
> manager = factory.getDeploymentManager(uri, username, password);
> if (manager != null) {
> return manager;
> }
> } catch (DeploymentManagerCreationException e) {
> throw new DeploymentManagerCreationException("Could not get
> DeploymentManager: " + e.getMessage());
> }
>
> Why are you rethrowing the same exception with a munged message?
>
> Given we need to do that, can we inject the original cause:
> DeploymentManagerCreationException e2 =
> new new DeploymentManagerCreationException("Could not get
> DeploymentManager: " + e.getMessage());
> e2.initCause(e);
> throw e2;
Well, the pre-patch code threw a completely new exception and
squashed the original (I think it said throw new DMCE("Could not get
DeploymentManager")). I was trying to improve on that without fully
replacing it. No good reason. Let's just drop the catch clause and let
the original exception go through.
Aaron