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,5f260a1d9f0c280c,start X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!postnews.google.com!v26g2000prm.googlegroups.com!not-for-mail From: shaunpatterson@gmail.com Newsgroups: comp.lang.ada Subject: Common exception handling Date: Tue, 26 Aug 2008 05:17:32 -0700 (PDT) Organization: http://groups.google.com Message-ID: <88961e92-80a8-4e96-b231-9d67eca0adf5@v26g2000prm.googlegroups.com> NNTP-Posting-Host: 155.219.241.10 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1219753052 31880 127.0.0.1 (26 Aug 2008 12:17:32 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 26 Aug 2008 12:17:32 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v26g2000prm.googlegroups.com; posting-host=155.219.241.10; posting-account=O0hwoQoAAABTUhctVKyLpysYxVt3QnYo User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:1788 Date: 2008-08-26T05:17:32-07:00 List-Id: I'm wondering if there is a clean way to do something common for all throw exceptions and then handle each exception. For exception... procedure Test (Rec : Record) is begin ... throw 3 possible exceptions... exception when A => Print_Test (Rec); ... when B => Print_Test (Rec); ... when C => Print_Test (Rec); ... when others => Print_Test (Rec); end Test; I'd like to not duplicate the Print_Test in each situation. Is there an easy way Thanks, Shaun