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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5486a6bc39241084,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-11 10:08:47 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!195.64.68.27!newsgate.cistron.nl!news2.euro.net!newspeer.clara.net!news.clara.net!news5-gui.server.ntli.net!ntli.net!news2-win.server.ntlworld.com.POSTED!not-for-mail From: "chris.danx" Newsgroups: comp.lang.ada Subject: Questions on implementations and specs MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Thu, 11 Oct 2001 18:03:41 +0100 NNTP-Posting-Host: 62.253.9.23 X-Complaints-To: abuse@ntlworld.com X-Trace: news2-win.server.ntlworld.com 1002819808 62.253.9.23 (Thu, 11 Oct 2001 18:03:28 BST) NNTP-Posting-Date: Thu, 11 Oct 2001 18:03:28 BST Organization: ntlworld News Service Xref: archiver1.google.com comp.lang.ada:14297 Date: 2001-10-11T18:03:41+01:00 List-Id: Hi, I'm working with XMLAda and would like to be able to detect if a file could not opened, but I see XMLAda provides no such exception or routine. XMLAda uses the package direct io (in input_sources.file), which means that a name_error will be raised should opening the file not be possible. Should I rely on the fact that it is based on direct io and therefore will raise the name_error exception or should I do something else? I'm not knocking XMLAda for not providing an exception in it's spec for this condition, it's just I've seen that sometimes an assumption is made that standard exception will be propagated from standard routines and expect the user to know this or look at the implementation (i.e. the exception is not documented). I was under the impression that the programmer should not need to look at the implementation *in most cases* (of course there are cases when we do need to look at the implementation). Is it common to assume this implicitly? I recognise that the designer(s) of XMLAda may have chosen this deliberately or haven't got to this yet (since it's a beta), I'm curious about this in general. Chris Campbell p.s. In the case of XMLAda, I've just noted that it does propagate this exception by putting it as a renaming in the file (adding Name_Error : exception renames Ada.IO_Exceptions.Name_Error at the top of input_sources.file (spec)). This isn't a big deal, and I don't want it to turn into one.