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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed.arcor.de!news.arcor.de!not-for-mail Date: Sat, 26 Mar 2005 14:55:19 +0100 From: Georg Bauhaus User-Agent: Debian Thunderbird 1.0 (X11/20050116) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Subject: Re: Class hierarchy of exceptions (Ada, C++) References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110032222.447846.167060@g14g2000cwa.googlegroups.com> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> <87r7iu85lf.fsf@insalien.org> <1110052142.832650@athnrd02> <1110284070.410136.205090@o13g2000cwo.googlegroups.com> <395uqaF5rhu2mU1@individual.net> <1111607633.301232.62490@z14g2000cwz.googlegroups.com> <87oed6wvyx.fsf_-_@insalien.org> <78nfet0wiu9o.oyhnnedi6wss$.dlg@40tude.net> In-Reply-To: <78nfet0wiu9o.oyhnnedi6wss$.dlg@40tude.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4245697c$0$27201$9b4e6d93@newsread4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 26 Mar 2005 14:54:04 MET NNTP-Posting-Host: 9f2ad90f.newsread4.arcor-online.net X-Trace: DXC=1_=a[B7JiH13JZ Dmitry A. Kazakov wrote: > On Sat, 26 Mar 2005 11:19:18 +0100, Ludovic Brenta wrote: >>Perhaps a good middle-ground would be an addition to Ada along the >>lines of: >> >>package Ada.Exceptions.Extra is >> type Extra_Information is abstract tagged null record; >> >> procedure Raise_Exception (E : in Exception_Id; >> Information : in Extra_Information'Class); >> >> function Exception_Information (X : Exception_Occurrence) >> return Extra_Information'Class; >>end Ada.Exceptions.Extra; How about declare ... procedure bounce is begin set_up_information_to_pass; end; begin raise with bounce'access; end; >>Programs that want to carry rich information with exceptions would be >>allowed to do so, while "pragma Restrictions (No_Dispatch)" or >>"No_Dynamic_Allocation" would guarantee, to those interested, that no >>such thing happens. > A pair of simple questions: