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 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-27 18:30:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!cyclone.swbell.net!newsfeed1.easynews.com!easynews.com!easynews!newsfeed1.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3ED4114A.5060204@spam.com> From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: I/O - exception handling References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 28 May 2003 01:27:57 GMT NNTP-Posting-Host: 63.184.0.210 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1054085277 63.184.0.210 (Tue, 27 May 2003 18:27:57 PDT) NNTP-Posting-Date: Tue, 27 May 2003 18:27:57 PDT Xref: archiver1.google.com comp.lang.ada:37871 Date: 2003-05-28T01:27:57+00:00 List-Id: I'm not sure what all the fuss is about. Close can only raise Status_Error, and only if the file is not open (ARM A.8.2). Is_Open may not raise an exception (ARM A.8.2). So the pattern begin Open (File, ...); -- Process File Close (File); -- If Open failed, we do not get here, so this cannot -- raise an exception exception when others => if Is_Open (File) then Close (File); end if; end; is completely safe. -- Jeff Carter "You've got the brain of a four-year-old boy, and I bet he was glad to get rid of it." Horse Feathers