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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,462a4f123e2d4476 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-22 16:42:25 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!deine.net!intgwpad.nntp.telstra.net!news.telstra.net!news-server.bigpond.net.au!not-for-mail From: "Greg Bek" Newsgroups: comp.lang.ada References: Subject: Re: not handled exceptions X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Message-ID: Date: Sat, 23 Mar 2002 00:42:23 GMT NNTP-Posting-Host: 144.136.168.109 X-Complaints-To: news@bigpond.net.au X-Trace: news-server.bigpond.net.au 1016844143 144.136.168.109 (Sat, 23 Mar 2002 11:42:23 EST) NNTP-Posting-Date: Sat, 23 Mar 2002 11:42:23 EST Organization: BigPond Internet Services (http://www.bigpond.net.au) Xref: archiver1.google.com comp.lang.ada:21564 Date: 2002-03-23T00:42:23+00:00 List-Id: Your code is working properly. In the first example there is no exception handler in the declarative region where the array is declared and the exception raised. As for why it is hanging, the exception is being raised, there is no handler at local scope so the exception is propagating outwards looking for a handler. I'm guessing it is reaching the outermost scope of your program and then it is up to the runtime system to properly deal with the situation. Not sure why GNAT hangs. Greg Bek "Michal Nowikowski" wrote in message news:pan.2002.03.22.18.40.05.457489.4682@zamek.gda.pl... > Hello > > I've got problem with exceptions. It is my code: > > declare > D : Integer_Array_Access; > begin > -- D is not allocated, so such call should raise > -- Constraint_Error exception: > D(3) := 5; > end; > > but program does not throw exception instead it hangs. > When I do: > > begin > D(3) := 5; > exception > Constraint_Error => > put_line("exception raised"); > end; > > the exception is raised and message is seen - program > continue execution. > > I use Gnat 3.14 on Linux box. Have You any idea how to > solve this problem? > > Best regards > Godfryd > > -- > | Michal Nowikowski > | BOFH excuse #360: Your parity check is overdrawn and you're out > | of cache.