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-Thread: 103376,59d3b7d8c55b8999 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!z34g2000cwc.googlegroups.com!not-for-mail From: "REH" Newsgroups: comp.lang.ada Subject: Re: exception propagation for a distributed call Date: 7 Mar 2006 07:19:35 -0800 Organization: http://groups.google.com Message-ID: <1141744775.715048.32970@z34g2000cwc.googlegroups.com> References: <1141742171.664900.4710@p10g2000cwp.googlegroups.com> NNTP-Posting-Host: 192.91.173.36 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1141744781 22139 127.0.0.1 (7 Mar 2006 15:19:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 7 Mar 2006 15:19:41 +0000 (UTC) In-Reply-To: <1141742171.664900.4710@p10g2000cwp.googlegroups.com> User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: z34g2000cwc.googlegroups.com; posting-host=192.91.173.36; posting-account=lnUIyw0AAACoRB2fMF2SFTIilm8F10q2 Xref: g2news1.google.com comp.lang.ada:3284 Date: 2006-03-07T07:19:35-08:00 List-Id: REH wrote: > I need to implement something that has probably already been done > hundreds of times. I have to implement some distributed calls (i.e., > across sockets, arinc ports, separate memory partitions, etc.). I need > to trap any exception that may occur, and re-raise it for the caller, > like CORBA does (though I cannot use CORBA, RPC, etc.). I also do not > want to replicate a lot of code in each exception block. What I have > so far is to create a procedure that will take an exception occurence > as a parameter and call it in each exception block at a "when others > =>" arm. The function returns an enumeration value for the exception > which can be marshalled across and re-raised via a case statement. > What I cannot figure out is how to convert the occurrence in a portable > way so I do not have to use compiler-specific features. I know I can > convert it to an exception_id, but how do I determine which exception > the id is for? Is there a way to get the id of an exception without > raising it? Or, is there a better way > > Thanks, > > REH Ah, I should have dug deeper before asking. I just discovered I can do: E'Identity on an exception. Thanks. REH