Adrian Crum wrote:
> I remember you complaining a while back about developers who wrap
> exceptions - because it makes code harder to debug. (I agree with that
> view, btw.) Has that view changed?

try {
} catch (FooException e) {
    e.printStackTrace(); // Or Debug.logError(e)
    throw new BarException(e.getMessage());
}

That's what I complained about.  Utility code should *never* print(or
log) an exception.  It should always throw it to the calling code, and
let it decide.  Of course, then you have to figure out how much is
actually utility, and how much is higher-level.

> Why not add a throws clause to the enclosing FreemarkerWorker method?

Because that exposes the inner workings of the method in question.

Reply via email to