comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: question on exceptions
Date: 1996/11/09
Date: 1996-11-09T00:00:00+00:00	[thread overview]
Message-ID: <E0MAEK.EGs.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: dewar.847504661@merv


Robert Dewar (dewar@merv.cs.nyu.edu) wrote:
: Bob Duff says

:> "By the way, during the design of Ada 9X, it was suggested that we have
:> functions for querying things like the Current_Exception_Name and
:> Current_Exception_String.  However, the design team rejected this idea
:> for the reasons explained above -- presumably the semantics of calling
:> these at the wrong time would be "erroneous", which is bad.  

: I see no reason why these could not be functoins which can only be called
: within a handler, checked statically by the compiler. This is how GNAT
: implements the DEC Current_Exception package (which has these semantics).

There would still be some possible ambiguities associated with such 
functions.  What are their semantics when there is an exception raised and 
then handled in some statement within the handler, but preceding 
the call to one of these special functions?  Does it report the
most recent exception raised, or does it report the exception being
handled by the current handler?  Also, what happens if you rename
such a subprogram?  Does the renaming retain its special status?

I presume we generally agree that having a namable exception 
occurrence object makes the semantics clearer, and gives the
programmer a bit more flexibility.

-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Cambridge, MA  USA




  reply	other threads:[~1996-11-09  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 ` 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
1996-11-08  0:00         ` Robert A Duff
1996-11-08  0:00       ` Robert Dewar
1996-11-09  0:00         ` Tucker Taft [this message]
     [not found]           ` <E0Mr58.D00@world.std.com>
1996-11-09  0:00             ` Robert Dewar
1996-11-03  0:00 ` Robert A Duff
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