This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: Error handling from C
- To: jmmv84 at yahoo dot com
- Subject: Re: Error handling from C
- From: Gary Houston <ghouston at arglist dot com>
- Date: 1 Aug 2000 07:17:18 -0000
- CC: guile at sourceware dot cygnus dot com
- References: <20000731213746.27127.qmail@web2106.mail.yahoo.com>
> Date: Mon, 31 Jul 2000 14:37:46 -0700 (PDT)
> From: Juli-Manel Merino Vidal <jmmv84@yahoo.com>
> Hi all,
>
> I'm trying to recover the program control after an
> scheme call fails
> because bad syntax or something else.
>
> I've seen in the info docs that scm_error_callback can
> be used, but it
> doesn't works... that definition doesn't exist in any
> header file of
> libguile (I've checked in older versions and it's
> there).
It's a documentation bug in scm.texi. Here's an old NEWS entry:
** The hook scm_error_callback has been removed. It was originally
intended as a way for the user to install his own error handler. But
that method works badly since it intervenes between throw and catch,
thereby changing the semantics of expressions like (catch #t ...).
The correct way to do it is to use one of the C level catch functions
in throw.c: scm_internal_catch/lazy_catch/stack_catch.