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,88076dc693273166 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-04 12:35:36 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!elnk-pas-nf1!elnk-nf2-pas!newsfeed.earthlink.net!attbi_feed3!attbi.com!attbi_s01.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: To raise an exception in task and handle/catch it in outer-block. References: <3gTJb.369$Mb5.7531@news2.e.nsc.no> X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 67.161.24.134 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s01 1073248535 67.161.24.134 (Sun, 04 Jan 2004 20:35:35 GMT) NNTP-Posting-Date: Sun, 04 Jan 2004 20:35:35 GMT Organization: Comcast Online Date: Sun, 04 Jan 2004 20:35:35 GMT Xref: archiver1.google.com comp.lang.ada:4104 Date: 2004-01-04T20:35:35+00:00 List-Id: Your code is right. Raising an exception in a rendezvous will raise the exception in both the task and its caller (caller = what you are calling outer block, right?) accept Final do ... raise test_exception; -- raise exception in caller end Final; You might instead want to use Ada.Exceptions.Save_Occurrence in the task, pass the Exception_Occurrence_Access (or null) to the caller at a rendezvous, then Reraise_Occurrence at a convenient point in the caller.