comp.lang.ada
 help / color / mirror / Atom feed
From: "chris.danx" <chris.danx@ntlworld.com>
Subject: Questions on implementations and specs
Date: Thu, 11 Oct 2001 18:03:41 +0100
Date: 2001-10-11T18:03:41+01:00	[thread overview]
Message-ID: <Ahkx7.4857$i14.643289@news2-win.server.ntlworld.com> (raw)

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.







             reply	other threads:[~2001-10-11 17:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-11 17:03 chris.danx [this message]
2001-10-11 18:31 ` Questions on implementations and specs chris.danx
2001-10-11 22:39   ` chris.danx
2001-10-12 10:31 ` Aidan Skinner
2001-10-12 12:39   ` chris.danx
2001-10-12 16:43     ` Darren New
2001-10-14 13:41       ` Marc A. Criley
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox