This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Error handling from C


> 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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]