[I hope this message gets to the list before everyone else has answered - my last post 
took about 12 hours to get through!]

> Blair Wyman wrote: 
> 
> Sure, in simple cases the argument is often made that "the 
> poor class user has to wrap all his constructor calls with 
> try/catch," but that isn't necessarily so.  If the 

Blair, I agree with all the comments you made. However, it unfortunately seems that 
all too frequently developers have the attitude expressed by the above quote with 
regards to exception handling - i.e. 

"Oh, it's such a pain having to deal with all these exceptions. I can save myself 
loads of work by just: (1) always throwing RuntimeException, or (2) placing a huge 
try/catch(Exception) round all my code, or (3) never throwing exceptions (absorb 
errors or use error codes)". 

I've seen all 3 of these techniques employed, which in almost all cases pretty much 
defeat the whole purpose Java's exception mechanism! Yes, coding proper exception 
handling into your apps takes significant effort and requires careful consideration of 
the functionality and how it will be used, but the alternative is apps that are 
unpredictable and clumsy. 

Anwyay, getting back to the original point, yes, throw exceptions from constructors if 
failing to do this would create an invalid object. 

____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________

Reply via email to