On Thursday, January 23, 2003, at 09:56 pm, Rodney Waldhoff wrote:
While there may be cases in which "catch(Exception e)" could be construed as reasonable thing to do, I think we'd be hard pressed to ever justify "catch(Throwable t)".
+1 There are very, very few cases where you want to catch an error, and then only in something like an appserver where choices remain.
(I'm also in favor of weeding out "catch(Exception e)" and for that matter "throws Exception" wherever possible, but Throwable should absolutely go IMO.)
"throws Exception" is very evil. However, catch(SpecificExceptionA a) { } catch(SpecificException b) { } catch(Exception e) { } is quite justifiable. Often, the last case is involved in translating the exception into something suitable for the error above; ideally nesting the original. In particular, I very much dislike somelike Ant or Jelly dying with the old "NullPointerException". I'd prefer at least to get a specific error telling where to report it to, and apologising... -- David Kennedy [EMAIL PROTECTED] -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>