Re: Exceptions and Streams
- From: Simon Wright <simon@xxxxxxxxxxxx>
- Date: Sun, 21 May 2006 21:40:38 +0100
"REH" <spamjunk@xxxxxxxxxxx> writes:
1) Does 11.4.1 (16) of the RM (see below) say that I can stream an
exception occurrance to another address space and re-raise it? Note
that I am not using "partitions" as defined in the Distributed Ada
Annex, but just separate address spaces.
I have certainly had trouble streaming ::something to do with
exceptions:: with GNAT, but I'm afraid I can't remember what. The
symptom was an endless recursion, I think. Not much help, I know.
One thought: with 'gnatbind -E', GNAT keeps a traceback in the
occurence, but it's in terms of addresses so may not make a lot of
sense in another address space. This can also cause confusion in
exceptions raised during rendezvous if the traceback is reported from
the caller's point of view!
2) Is there an easy way to determine the number of elements an
object of a given type will write to a stream before hand? I need
to know how big to make the array to hold all a procedures
parameters, and I don't want to have to hard-code things like dupe
vector sizes.
You might find it easier to create a stream which could extend itself
on overflow?
I found 'Max_Size_In_Storage_Elements + 128 worked well (the streamed
version will very likely be smaller than 'Max_Size.., plus something
for the constraints).
.
- Follow-Ups:
- Re: Exceptions and Streams
- From: REH
- Re: Exceptions and Streams
- References:
- Exceptions and Streams
- From: REH
- Exceptions and Streams
- Prev by Date: Re: Multi-arch
- Next by Date: Re: Dot notation in Ada 2005
- Previous by thread: Exceptions and Streams
- Next by thread: Re: Exceptions and Streams
- Index(es):
Relevant Pages
|
|