Re: [gtk-list] Re: rfc: exceptions (code included)



On Tue, Jul 20, 1999 at 03:29:35PM +0200, Balazs Scheidler wrote:
> 
> Yes, they behave just like C++ exceptions, but instead of keywords you have
> to use macros. There are some questions open:
> 
> * maybe we should use automatic variables instead of heap allocated
>   structures for GExceptionBlock, so that if a routine is exited from within
>   the TRY block, that exception block gets automatically freed.
> * we should check how the whole thing will interact with C++ exceptions.
>   gtk-- AFAIR uses exceptions extensively, so this is a real issue
> * there should be some automatic way to rethrow an exception, if it's not
>   handled at the current catch level.

As C dont have object constructors/destructors, I think a G_FINALY is
needed so code that may be intercepted by an exception can restore
state/free resorses.

HTH /Lars



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]