comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com
Subject: Re: Exception Propagation
Date: 1999/06/09
Date: 1999-06-09T00:00:00+00:00	[thread overview]
Message-ID: <7jlud1$l76$1@nnrp1.deja.com> (raw)
In-Reply-To: 0nc73.5376$y6.3195132@WReNphoon3

In article <0nc73.5376$y6.3195132@WReNphoon3>,
  cdecker@snet.net (Decker, Christian R) wrote:
> OK, everyone is mis-understanding my question, and i apologize.....
> I understand that when an exception is raised in a task that it is not
> deterministic as to where the exception gets
> propagated as far as being able to trap and handle it.

There certianly is a misunderstanding here. I hope I didn't cause it.

What I was trying to say is that an exception is *not* propagated into
any task other than the one it occurred in (except in a rendezvous). If
I were to create language TERD, which did have that behavior, then in
TERD it would be completly non-deterministic in the parent task where an
exception raised from the child task popped up. Therefore there would be
no good way to handle and recover from exceptions in child tasks. That's
probably one reason why the designers of Ada did not do that! In Ada
tasks can only get exceptions from themselves or from tasks they
rendezvous with during the rendezvous. That makes it quite
deterministic.

As for warning you that a task died, in my experinece most compilers do
*not* do that. Whether that is from concerns about synchronizing writes
to standard output, or from sheer lazieness I can't say. But I know that
both Gnat and GreenHills behave that way, and I suspect ObjectAda does
as well.

If you *do* write such code in last-ditch handlers on your tasks, make
sure to handle the IO synchronization problem yourself, or you are
liable to get interspersed output, or different exceptions than the ones
you are looking for.

--
T.E.D.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




  parent reply	other threads:[~1999-06-09  0:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-07  0:00 Exception Propagation Decker, Christian R
1999-06-07  0:00 ` dennison
1999-06-08  0:00   ` Glen
1999-06-08  0:00     ` Robert Dewar
1999-06-09  0:00       ` Matthew Heaney
1999-06-08  0:00         ` R. Tim Coslet
1999-06-09  0:00         ` Robert Dewar
1999-06-09  0:00         ` dennison
1999-06-08  0:00     ` dennison
1999-06-08  0:00     ` Decker, Christian R
1999-06-08  0:00       ` David C. Hoos, Sr.
1999-06-08  0:00       ` Robert Dewar
1999-06-09  0:00       ` dennison [this message]
1999-06-14  0:00         ` Robert A Duff
1999-06-14  0:00           ` dennison
1999-06-15  0:00             ` Robert A Duff
1999-06-14  0:00           ` Bryce Bardin
1999-06-15  0:00           ` Dale Stanbrough
1999-06-15  0:00             ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
2006-03-15 15:16 Exception propagation REH
2006-03-16 21:29 ` Ludovic Brenta
2006-03-16 22:19   ` REH
2006-03-16 22:51     ` Ludovic Brenta
2006-03-17  2:52       ` REH
2006-03-17 14:52         ` Georg Bauhaus
replies disabled

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