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!news1.google.com!newsread.com!newsprint.newsread.com!newsfeed00.sul.t-online.de!t-online.de!tsicnews.teliasonera.com!news.otenet.gr!news.grnet.gr!newsfd02.forthnet.gr!not-for-mail From: Ioannis Vranos Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Subject: Re: Class hierarchy of exceptions (Ada, C++) Date: Sun, 27 Mar 2005 00:33:46 +0200 Organization: FORTHnet S.A., Atthidon 4, GR-17671 Kalithea, Greece, Tel: +30 2109559000, Fax: +30 2109559333, url: http://www.forthnet.gr Message-ID: <1111876424.201726@athnrd02> 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> NNTP-Posting-Host: athnrd02.forthnet.gr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: athprx02.forthnet.gr 1111876424 9234 193.92.150.73 (26 Mar 2005 22:33:44 GMT) X-Complaints-To: abuse@forthnet.gr NNTP-Posting-Date: Sat, 26 Mar 2005 22:33:44 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en In-Reply-To: <87oed6wvyx.fsf_-_@insalien.org> Cache-Post-Path: newsfd02!unknown@ppp33-adsl-67.ath.forthnet.gr Xref: g2news1.google.com comp.lang.ada:10032 comp.lang.c++:47369 comp.realtime:1746 comp.software-eng:5366 Date: 2005-03-27T00:33:46+02:00 List-Id: Ludovic Brenta wrote: > I kind of like Ada exceptions as they are now. Because one cannot > carry much information in them (apart from the kluge you mentioned), > one tends not to rely on them for the normal flow of operations. I > have seen Java programs that would rely on exceptions for all kinds of > things, leading to spaghetti code. In C++ I find it a bit odd that I > can throw and catch an entire hash table as an exception if I want to. Being able to do whatever you want can certainly cause confusion for anyone who is used to be helped how to program. However, if you know the language, you know what to do and what to not do. Also this way is more powerful. > The C++ way of catching all exceptions of a class and its derived > classes can lead to confusion. One can have multiple exception > handlers for the same exception and it may not be immediately obvious > to the reader which one is called. I see this as a maintenance > problem. :-) Being able to walk alone can also lead to confusion. Isn't it better if you walk with assistance? > Another concern of mine with exception classes is that they'd have to > be allocated on the heap. No, they do not have to. One can (and in most times does) throw an exception object on the stack. -- Ioannis Vranos http://www23.brinkster.com/noicys