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,699cc914522aa7c4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!130.59.10.21.MISMATCH!kanaga.switch.ch!news-zh.switch.ch!switch.ch!news.ip-plus.net!newsfeed.ip-plus.net!news.post.ch!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Structured exception information (task, ANEX E) Date: Mon, 22 Jan 2007 08:17:53 +0100 Organization: Swisscom IP+ (post doesn't reflect views of Swisscom) Message-ID: <45b46521$1@news.post.ch> References: <45acd36e$1@news.post.ch> NNTP-Posting-Host: 194.41.146.1 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: atlas.ip-plus.net 1169450277 17379 194.41.146.1 (22 Jan 2007 07:17:57 GMT) X-Complaints-To: abuse@ip-plus.net NNTP-Posting-Date: Mon, 22 Jan 2007 07:17:57 +0000 (UTC) User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) In-Reply-To: X-Original-NNTP-Posting-Host: w01iwt.pnet.ch X-Original-Trace: 22 Jan 2007 08:17:53 +0200, w01iwt.pnet.ch Xref: g2news2.google.com comp.lang.ada:8390 Date: 2007-01-22T08:17:53+01:00 List-Id: Robert A Duff schrieb: > Martin Krischik writes: > >> Maciej Sobczak schrieb: >> >>> Yes, I'm asking for "throwing objects", in the C++ parlance. >>> How to do this in Ada? >>> If I cannot - how to solve this design problem? >> I believe this was skipped in Ada because of ANEX E and task types. > > I don't see any problems there. > >> ...You >> must understand that Ada exceptions quite often propagated across thread >> borders and sometimes - if ANEX E is implemented - over a network >> connections to another computer. >> >> I do not say this is impossible but it could be quite expensive >> performance wise. > > Efficiency is irrelevant to language design. You should never leave a > feature out merely because it's slow. What matters is distributed > overhead, and I see none here. Yes, if an exception propagates across a > network, you have to ship all the data across the network. The > programmer controls how much data that is, so it's not a problem. > Besides, shipping a String is no more efficient than shipping properly > typed data. Realy? How about access types? C++ allows access types inside exceptions. > Many other languages have solved this problem (even in the presence of > threads and distributed systems). A Weblogic Server just converts the exception into ...UserException or ...SystemException and then adds the old exception name as string. Any "structured exception information" beeing stripped before propagation. What a great solution. > The 200-character limit was a mistake, by the way. It was based on > fictitious implementation difficulties. Ada already has functions > that return results whose size is not known at the call site (e.g. > "return String"). The same memory-management techniques would apply to > arbitrary-sized exception occurrences. And it is optional - a implementation is free to do it better. Martin