> -----Original Message-----
> From: Andrew Hill [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, November 18, 2002 7:31 AM
> To: Struts Users Mailing List
> Subject: RE: [Struts Tip] #15 Use chained exceptions. Design 
> consideration.
> 
> 
> eeee. thats horrible.
> I use:
> 
> catch(Exception e)
> {
>   ;
> }
> 
> to make it absolutely clear (ie: that I didnt just get 
> distracted and forget to write the code for that block)

I can't think of many (any?) times when that is good practice. It makes
it very hard to debug cases where some totally unexpected Exception
subclass is thrown and silently swallowed. Sure, we've all done it
sometimes, but I wouldn't talk about it on a mailing list :-)

Case in point that recently happened to a co-worker: he had an empty
catch in a place where "nothing could possibly go wrong and even if it
did you couldn't do anything about it." However, later code refactoring
caused a ClassCastException to occur and be caught silently. It was very
confusing.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to