* exception propagation for a distributed call
@ 2006-03-07 14:54 REH
2006-03-07 15:19 ` REH
2006-03-07 16:11 ` Wilhelm Spickermann
0 siblings, 2 replies; 7+ messages in thread
From: REH @ 2006-03-07 14:54 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: exception propagation for a distributed call
2006-03-07 14:54 exception propagation for a distributed call REH
@ 2006-03-07 15:19 ` REH
2006-03-07 16:11 ` Wilhelm Spickermann
1 sibling, 0 replies; 7+ messages in thread
From: REH @ 2006-03-07 15:19 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: exception propagation for a distributed call
2006-03-07 14:54 exception propagation for a distributed call REH
2006-03-07 15:19 ` REH
@ 2006-03-07 16:11 ` Wilhelm Spickermann
2006-03-07 16:52 ` REH
1 sibling, 1 reply; 7+ messages in thread
From: Wilhelm Spickermann @ 2006-03-07 16:11 UTC (permalink / raw)
Hi,
REH wrote:
...
> Iï¿œneed
> to trap any exception that may occur, and re-raise it for the
> caller, like CORBA does
...
Ada does it too.
Wilhelm
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: exception propagation for a distributed call
2006-03-07 16:11 ` Wilhelm Spickermann
@ 2006-03-07 16:52 ` REH
2006-03-07 17:37 ` Wilhelm Spickermann
2006-03-07 18:44 ` Martin Krischik
0 siblings, 2 replies; 7+ messages in thread
From: REH @ 2006-03-07 16:52 UTC (permalink / raw)
Wilhelm Spickermann wrote:
> Hi,
>
> REH wrote:
>
> ...
> > I need
> > to trap any exception that may occur, and re-raise it for the
> > caller, like CORBA does
> ...
>
> Ada does it too.
>
> Wilhelm
I don't think you understand what I was asking, unless you are talking
about the distributed systems appendix, which I cannot use.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: exception propagation for a distributed call
2006-03-07 16:52 ` REH
@ 2006-03-07 17:37 ` Wilhelm Spickermann
2006-03-07 17:58 ` REH
2006-03-07 18:44 ` Martin Krischik
1 sibling, 1 reply; 7+ messages in thread
From: Wilhelm Spickermann @ 2006-03-07 17:37 UTC (permalink / raw)
REH wrote:
> you are talking
> about the distributed systems appendix,
yes
> which I cannot use.
Sorry -- I didn't notice that.
Wilhelm
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: exception propagation for a distributed call
2006-03-07 17:37 ` Wilhelm Spickermann
@ 2006-03-07 17:58 ` REH
0 siblings, 0 replies; 7+ messages in thread
From: REH @ 2006-03-07 17:58 UTC (permalink / raw)
Wilhelm Spickermann wrote:
> REH wrote:
>
> > you are talking
> > about the distributed systems appendix,
>
> yes
>
> > which I cannot use.
>
> Sorry -- I didn't notice that.
I didn't explicitly state that, so no apology is necessary. Thanks for
trying to help.
REH
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: exception propagation for a distributed call
2006-03-07 16:52 ` REH
2006-03-07 17:37 ` Wilhelm Spickermann
@ 2006-03-07 18:44 ` Martin Krischik
1 sibling, 0 replies; 7+ messages in thread
From: Martin Krischik @ 2006-03-07 18:44 UTC (permalink / raw)
REH wrote:
>
> Wilhelm Spickermann wrote:
>> Hi,
>>
>> REH wrote:
>>
>> ...
>> > I need
>> > to trap any exception that may occur, and re-raise it for the
>> > caller, like CORBA does
>> ...
>>
>> Ada does it too.
>>
>> Wilhelm
>
> I don't think you understand what I was asking, unless you are talking
> about the distributed systems appendix, which I cannot use.
If you can not use all the libraries which have the feature in then you will
have to replicate there functionality. That is: you have to write your own
Annex E or your own CORBA. At least the exception handler part. And since
both PolyORB and GLADE are open source: Why not get inspiration there?
Martin
--
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-03-07 18:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-07 14:54 exception propagation for a distributed call REH
2006-03-07 15:19 ` REH
2006-03-07 16:11 ` Wilhelm Spickermann
2006-03-07 16:52 ` REH
2006-03-07 17:37 ` Wilhelm Spickermann
2006-03-07 17:58 ` REH
2006-03-07 18:44 ` Martin Krischik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox