Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: Trying to Understand Purpose of a Catch Block for IOException in the Presence of One for FileNotFound Date: Fri, 12 Aug 2011 12:08:29 -0700 Organization: A noiseless patient Spider Lines: 18 Message-ID: References: <0f7fb5c4-6031-4778-9ef7-de757bbdda39@m5g2000prh.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 12 Aug 2011 19:08:38 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="18061"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199J1q5+qvcbixPPsk1yRsPqkMpP35d5N0=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 In-Reply-To: Cancel-Lock: sha1:BhtEmwwR2eEZ4R+iCOkWE9RI9G4= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7052 On 8/12/2011 11:19 AM, KevinSimonson wrote: > new FileWriter( arguments[ 1]))); > So try running this program and doing various things to the two > files. If you can find something that actually generates a > , please, _please_, let me know what you did! The FileWriter constructor is declared to generate an IOExcpetion. I don't have time to mess with it, but it's likely a large variety of network file systems could generate an IO error of various types. While any other error might be swallowed by the PrintWriter, you are briefly exposed to the vagaries file system while that constructor is running.