Re: Regarding exceptions



Hey Jost,

Apologies for an asynchronous reply...

On Wed, 2004-09-08 at 19:02 +0200, Jost Boekemeier wrote:
>  --- Andy Wingo <wingo pobox com> schrieb: 
> > 1. setjmp/longjmp aren't portable
> > 1 isn't true (cf. perl, guile). 
> 
> See chicken as a counter-example.

That's not the point. Perl and guile are examples of *programs* that
portably use setjmp and longjmp. It's a more limited point.

> > The CSEH techniques in the reliable-c paper
> 
> Completely unportable.  Nearly every high-level
> program/library handles this differently.

Of course. Even with guile, which happens to use setjmp/longjmp for
exceptions, you can't throw through guile code without using guile's
exception primitives. You would have to wrap calls to functions that
might produce GLib exceptions with catch blocks: one coming from C, and
one coming from guile.

I seem to have lost this argument, though. I'm not convinced it's
impossible, but it would be a lot of work and would probably introduce a
number of bugs. That will be the summary of the FAQ entry.

Regards,
-- 
Andy Wingo <wingo pobox com>
http://ambient.2y.net/wingo/



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