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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,86c750b8474bf6d5 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!peer-uk.news.demon.net!kibo.news.demon.net!mutlu.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: About String Date: Sun, 08 Jun 2008 12:13:50 +0100 Organization: Pushface Message-ID: References: <484ABED3.8040909@obry.net> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.demon.co.uk 1212923630 2057 62.49.19.209 (8 Jun 2008 11:13:50 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sun, 8 Jun 2008 11:13:50 +0000 (UTC) Cancel-Lock: sha1:tEVOKkP5AcXFRlpQl0H1UU+Irl8= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (darwin) Xref: g2news1.google.com comp.lang.ada:611 Date: 2008-06-08T12:13:50+01:00 List-Id: Pascal Obry writes: > Simon Wright a �crit : >> You might want to handle the problem locally: >> >> procedure Patati_Patata is >> begin >> declare >> S : String := A_Function_Raising_Constraint_Error; >> begin >> -- some code >> exception >> when Constraint_Error => >> -- deal with the problem and carry on .. >> end; >> -- .. here > > This one is wrong. The exception on the declare section can't be > handled on the local block as it will raised outside of the block. :blush: I meant to say procedure Patati_Patata is begin begin declare S : String := A_Function_Raising_Constraint_Error; begin -- some code end; exception when Constraint_Error => -- deal with the problem .. end; -- .. and carry on end;