Path: csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Daniele Futtorovic Newsgroups: comp.lang.java.programmer Subject: Re: streaming problem and thread freeze Date: Tue, 10 May 2011 21:17:32 +0200 Organization: A noiseless patient Spider Lines: 26 Message-ID: References: <005a9e79-36fe-4bf1-aa1d-bda3a5aaebf2@glegroupsg2000goo.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 10 May 2011 19:17:31 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="3ontdQOwqTpoXYF7H7NQoA"; logging-data="4132"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19086BSgNWEVQ7QlJ19ida8" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: Cancel-Lock: sha1:5AfhtGwJL6vNvVEAisBQGgcMWIA= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3933 On 10/05/2011 05:31, Lawrence D'Oliveiro allegedly wrote: > In message, Daniele Futtorovic wrote: > >> Secondly, although it is only a minor thing and only my personal >> opinion, this: >> >> } catch (IOException ex) { >> log.severe(ex.getMessage()); >> } >> >> is a *very* bad idea. Log the full stack. > > It would be so much easier if you could simply not bother to catch the > exception at all, and let your program crash with a full stack trace. It would be yet much easier, as you perhaps one day will learn, to realise that checked exceptions are not a bother, but an almost invaluable tool. And in cases you have to do something dirty, you can still simply throw an Error. -- DF. An escaped convict once said to me: "Alcatraz is the place to be"