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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1a4156f047b063f X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!e11g2000prm.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: Forcing Exception Handling Date: Mon, 28 Feb 2011 16:19:22 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <02901b13-da72-48ae-9cb3-bf1a10144c44@u3g2000vbe.googlegroups.com> <4d6c07c1$0$6885$9b4e6d93@newsspool2.arcor-online.net> NNTP-Posting-Host: 174.28.181.54 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1298938763 18501 127.0.0.1 (1 Mar 2011 00:19:23 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 1 Mar 2011 00:19:23 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e11g2000prm.googlegroups.com; posting-host=174.28.181.54; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0E),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:17651 Date: 2011-02-28T16:19:22-08:00 List-Id: On Feb 28, 1:38=A0pm, Georg Bauhaus wrote: > On 2/28/11 6:27 PM, iloAda wrote: > > > Hello everybody, > > > I was wondering if there is a way in Ada to force exception handling. > > For instance, if there is a call to a function that may raise an > > exception, force the caller to handle that exception. > > I was wondering if there is a compile time pragma that will isntruct > > the compiler to force the handling of exceptions!! > > IIRC, the new aspect specifications of Ada 2012 can be > used to specify that some exception might be raised. > Not sure, though. > > (Given that the feature is controversial in Java, > not everyone might want them for this...) I'm honestly not sure this would be a good idea... In fact, given that Ada doesn't have an "exception hierarchy" like Delphi does it may be a horrendous idea: There is no way to catch all exceptions because there is no way to catch a all exceptions of a certain type (i.e. Storage_Error'Class) which is caused by the lack of some root-type "Exception_Root."