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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,743cbb1eadac54f3 X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: question on exceptions Date: 1996/11/09 Message-ID: #1/1 X-Deja-AN: 195532556 sender: news@inmet.camb.inmet.com (USENET news) x-nntp-posting-host: houdini.camb.inmet.com references: organization: Intermetrics, Inc. newsgroups: comp.lang.ada Date: 1996-11-09T00:00:00+00:00 List-Id: 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