From: tmoran@acm.org
Subject: Re: To raise an exception in task and handle/catch it in outer-block.
Date: Sun, 04 Jan 2004 20:35:35 GMT
Date: 2004-01-04T20:35:35+00:00 [thread overview]
Message-ID: <rO_Jb.732342$HS4.5526937@attbi_s01> (raw)
In-Reply-To: 3gTJb.369$Mb5.7531@news2.e.nsc.no
Your code is right. Raising an exception in a rendezvous will raise
the exception in both the task and its caller (caller = what you are
calling outer block, right?)
accept Final do
...
raise test_exception; -- raise exception in caller
end Final;
You might instead want to use Ada.Exceptions.Save_Occurrence in the
task, pass the Exception_Occurrence_Access (or null) to the caller at
a rendezvous, then Reraise_Occurrence at a convenient point in the
caller.
next prev parent reply other threads:[~2004-01-04 20:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-04 5:58 To raise an exception in task and handle/catch it in outer-block Frank
2004-01-03 22:03 ` tmoran
2004-01-04 20:58 ` Frank
2004-01-04 20:35 ` tmoran [this message]
2004-01-07 3:48 ` Frank
2004-01-10 2:20 ` Craig Carey
2004-01-10 6:24 ` Robert I. Eachus
2004-01-10 21:05 ` Frank
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox