From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1096a7986b560ad6 X-Google-Attributes: gid103376,public From: Corey Minyard Subject: Re: In Exception ? Date: 1998/04/07 Message-ID: #1/1 X-Deja-AN: 341758353 Sender: minyard@wf-rch.cirr.com References: <35214b7a.0@news.profinet.at> <6g7fpc$l08$1@usenet.rational.com> <6gcjru$7im@drn.newsguy.com> Organization: Wonderforce Research Newsgroups: comp.lang.ada Date: 1998-04-07T00:00:00+00:00 List-Id: 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