comp.lang.ada
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
Subject: Re: In Exception ?
Date: 1998/04/07
Date: 1998-04-07T00:00:00+00:00	[thread overview]
Message-ID: <m2btud3e8g.fsf@wf-rch.cirr.com> (raw)
In-Reply-To: 6gcjru$7im@drn.newsguy.com


Gerhard Auinger wrote in message <35214b7a.0@news.profinet.at>...
>My problem: I want to establish a  routine that is called out of normal
>flow, or out of an exception handler. How can I get the knowledge whether I
>am 'in' an exception (means in its processing) or not.  Is there a sort of
>function than can be coded like
>
>         if  in_exception_handler  then
>           ...
>        else
>           ...
>        end if;

This seems like a rather odd thing to need.  In Ada, an exception is
much like a goto, it is just an alteration in the flow of execution,
really.  The knowledge you speak of would increase exception handling
time (you would need to update a task-specific variable) and I would
expect it would be very rarely used.

If you REALLY need to know this, I would suggest that in the functions
you are calling, you either have separate functions for exception and
non-exception versions, or you have a variable you pass in to tell it
if it is from an exception handler or not.  Since you know from the
first call out of the exception handler if you are in the exception
handler, this should work.  This is thread-safe, unlike global
variables and the like.

-- 
Corey Minyard               Internet:  minyard@acm.org
  Work: minyard@nortel.ca       UUCP:  minyard@wf-rch.cirr.com




  reply	other threads:[~1998-04-07  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <35214b7a.0@news.profinet.at>
1998-04-04  0:00 ` In Exception ? Paul Van Bellinghen
1998-04-07  0:00   ` John Herro
1998-04-05  0:00 ` Corey Ashford
1998-04-07  0:00   ` nabbasi
1998-04-07  0:00     ` Corey Minyard [this message]
     [not found]     ` <Er1n22.24v@world.std.com>
1998-04-07  0:00       ` Robert Dewar
1998-04-09  0:00     ` Mats Weber
1998-04-09  0:00       ` nabbasi
1998-04-09  0:00     ` Mats Weber
1998-04-09  0:00       ` nabbasi
1998-04-10  0:00         ` Larry Kilgallen
replies disabled

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