comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Exceptions and Streams
Date: Sun, 21 May 2006 21:40:38 +0100
Date: 2006-05-21T21:40:38+01:00	[thread overview]
Message-ID: <m2d5e76ri1.fsf@grendel.local> (raw)
In-Reply-To: 1148140984.807366.177480@g10g2000cwb.googlegroups.com

"REH" <spamjunk@stny.rr.com> 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).



  reply	other threads:[~2006-05-21 20:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-20 16:03 Exceptions and Streams REH
2006-05-21 20:40 ` Simon Wright [this message]
2006-05-22 15:11   ` REH
  -- strict thread matches above, loose matches on Subject: below --
1998-10-30  0:00 exceptions and streams Bernd Ragutt
1998-10-31  0:00 ` dewarr
1998-11-02  0:00   ` Bernd Ragutt
1998-11-03  0:00     ` dewar
1998-11-03  0:00       ` Tucker Taft
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox