From: Alexey Verkhovsky Date: 2004-08-29T23:41:18+09:00 Subject: Re: Typos (Was: performance comparison) On Sun, 2004-08-29 at 17:21, Lothar Scholz wrote: > I see a huge problem with this in many Java apps where the normal > reaction is to say: "okay lets throw an exception" but the programmer > never tries to handle it somewhere else then in the main loop with a > catch all clause. I'd say, in any language with exceptions support, handling an exception where you don't know what to do with it (instead of propagating it up the stack) is a much more common "shoddy programming technique" than what you describe. Variants of this anti-pattern are "Print stack trace and forget", "Wrap and re-throw" or even "Throw another exception and forget (losing the stack trace to the original error)". In most cases main loop or somewhere quite close to that is precisely the right place to handle exceptions, provided that "ensure" clause (or Java "finally") is used judiciously to close things like database connections and other expensive resources. Alex