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,820de86ed0dafb8a X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: Help Me Please :) Date: 2000/03/20 Message-ID: <38D68815.6A181FAA@averstar.com>#1/1 X-Deja-AN: 600076463 Content-Transfer-Encoding: 7bit References: <89rlvr$gn9$1@nntp3.atl.mindspring.net> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@inmet2.burl.averstar.com X-Trace: inmet2.burl.averstar.com 953583638 2464 141.199.8.164 (20 Mar 2000 20:20:38 GMT) Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 NNTP-Posting-Date: 20 Mar 2000 20:20:38 GMT Newsgroups: comp.lang.ada Date: 2000-03-20T20:20:38+00:00 List-Id: Brian Rogoff wrote: > ... > I think exception types would be a good thing, but its way too late to fix > that now, and it was probably too late for Ada 95. In fact, early in the Ada 9X process we proposed the equivalent of parameterized exceptions that formed a hierarchy. All quite elegant. It could still be done in my view. It was just beyond what the reviewers were ready for at the time. An alternative simpler addition is to add a package "Ada.Exceptions.Objects" or equivalent, which allows one to "Raise_With_Object" where you could pass in an object of any type extended from, say, Exception_Object_Root, and be able to retrieve it given an Exception_Occurrence, in the same way one can pass in a string, and retrieve it. We might set some arbitrary upper limit on the 'Size of the object passed in that must be supported by an implementation, e.g. 1500 bits (analogous to the 200 character limit for exception messages). > ... A future Ada-inspired > language could fix this. It's really not that far fetched. E.g.: Out_Of_Space : Exception(X : Integer; Y : access Blob) is new Storage_Error; ... raise Out_Of_Space(X => 5, Y => Blurfo'Access); ... when OOS : Out_Of_Space => Put_Line("Out of space, needed: " & Integer'Image(OOS.X)); > -- Brian -Tuck -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA