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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c71bf3c5adc59b21 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!t54g2000hsg.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Opening a file vs. creating if not yet exists Date: Tue, 19 Aug 2008 07:58:57 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <87k5edjd6y.fsf@nbi.dk> NNTP-Posting-Host: 128.141.45.246 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1219157937 25471 127.0.0.1 (19 Aug 2008 14:58:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 19 Aug 2008 14:58:57 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: t54g2000hsg.googlegroups.com; posting-host=128.141.45.246; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7379 Date: 2008-08-19T07:58:57-07:00 List-Id: On 19 Sie, 16:23, Jacob Sparre Andersen wrote: > I am certain it is well understood and commonly used, but in general > it is not advised to use exceptions in ordinary control flow. =A0Amado's > suggestion using Ada.Directories.File_Exists is definitely closer to > the advised practice. I understand this, but for some reasons I have to stick to Ada 95 features in this particular case. The atomicity of the complete solution is not an issue, since there is no chance for the log file to be deleted by some other entity. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com Database Access Library for Ada: www.inspirel.com/soci-ada