Amiga-C (123/223)

From:Alexander Niven-Jenkins
Date:15 Aug 2001 at 20:15:01
Subject:[amiga-c] Re: GCC and exceptions...

Hiya Allan,

On 15-Aug-01, you wrote:

> If I change 'throw 42;' to just say 'throw;' then it only write the
> above message once (but no 'catch in constructor').

I know that there are other problems as highlighted by Jan-Erik; but are
you actually allowed to do this? If you compile your example as suggested
with optimsations at level 0 the throw 42 works, however the throw doesn't.

If I remember correctly throw "rethrows" the exception to the next/outer
try...catch block; in your case there is no next/outer block so it is not
caught.

Although if you put another try...catch around it it still isn't caught;
could this be something to do with rethrowing an exception that hasn't been
thrown in the first place.

Or am I barking up the wrong tree completely.

Kind regards...

Alex



Cremlin Software - http://www.cremlinsoftware.org
Founder, lead programmer - mailto:ghandi@cremlinsoftware.org
Production, programmer - mailto:anj@cremlinsoftware.org

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/