From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: question on exceptions
Date: 1996/11/07
Date: 1996-11-07T00:00:00+00:00 [thread overview]
Message-ID: <E0I7zK.E4x.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: E0GJHH.5Jy@world.std.com
Robert A Duff (bobduff@world.std.com) wrote:
: ... My main
: complaint about the Ada 95 design for this stuff is that the information
: associated with an exception *must* be of type String. I suppose you
: can encode whatever information you want in a string, but not with type
: safety.
Perhaps Bob and I have different memories of this issue.
An Ada 95 exception occurrence can conceptually carry any information
of any type.
The only kind of information for which we specified a standard
set of operations was type String, largely because in
a "when others" clause, String is about all you could usefully presume.
On the other hand, there is nothing precluding an implementor, or
the implementor "community," from defining additional packages for allowing
additional kinds of information to be carried along with an exception
occurrence. In particular, such a package might define a root tagged
type for carrying information (e.g. type Root_Exception_Info is tagged
private;) which in the root type only carries one string, but then allow
a user to extend this type to carry any other kind of information.
In an exception handler, membership tests could be used to determine
what sort of additional information was passed along.
Personally, I had always envisioned that these new packages would appear
over time, but perhaps we should have given more of a push for them
in the Ada 95 RM.
: - Bob
-Tucker Taft stt@inmet.com http://www.inmet.com/~stt/
Intermetrics, Inc. Cambridge, MA USA
next prev parent reply other threads:[~1996-11-07 0:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-11-02 0:00 question on exceptions Michiel Perdeck
1996-11-03 0:00 ` Robert A Duff
1996-11-03 0:00 ` Laurent Guerby
1996-11-04 0:00 ` Do-While Jones
1996-11-06 0:00 ` Robert A Duff
1996-11-07 0:00 ` Tucker Taft [this message]
1996-11-08 0:00 ` Robert A Duff
1996-11-08 0:00 ` Robert Dewar
1996-11-09 0:00 ` Tucker Taft
[not found] ` <E0Mr58.D00@world.std.com>
1996-11-09 0:00 ` Robert Dewar
1996-11-04 0:00 ` Michel Gauthier
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox