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/07 Message-ID: #1/1 X-Deja-AN: 195081918 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-07T00:00:00+00:00 List-Id: 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