From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d8a4797a79f9c90f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-26 18:24:51 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.stealth.net news.stealth.net!news.stealth.net!cyclone1.gnilink.net!spamkiller2.gnilink.net!nwrdny03.gnilink.net.POSTED!53ab2750!not-for-mail From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030524 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: I/O - exception handling References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Tue, 27 May 2003 01:24:51 GMT NNTP-Posting-Host: 162.84.146.112 X-Complaints-To: abuse@verizon.net X-Trace: nwrdny03.gnilink.net 1053998691 162.84.146.112 (Mon, 26 May 2003 21:24:51 EDT) NNTP-Posting-Date: Mon, 26 May 2003 21:24:51 EDT Xref: archiver1.google.com comp.lang.ada:37816 Date: 2003-05-27T01:24:51+00:00 List-Id: Sergey Koshcheyev wrote: > Now of course, the fact that Close raises exceptions seems sort of useless, > even unhelpful. What am I supposed to do with a file, if I can't close it? We encounter this in C++ as well. The only thing you can do when close fails is to notify the user. C++ fstream objects have a close method which returns an error code if the underlying close fails, and their destructors just do a close without checking for errors, so you can have it whichever way you want.