Re: Regarding exceptions
- From: Andy Wingo <wingo pobox com>
- To: Jost Boekemeier <jost2345 yahoo de>
- Cc: gtk-devel-list gnome org
- Subject: Re: Regarding exceptions
- Date: Thu, 16 Sep 2004 19:49:07 +0200
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.
Andy Wingo <wingo pobox com>
] [Thread Prev