dev-serveez
[Top][All Lists]
Advanced

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

Re: [dev-serveez] guile switch


From: Martin Grabmueller
Subject: Re: [dev-serveez] guile switch
Date: Wed, 11 Apr 2001 10:54:53 +0200

> From: stefan <address@hidden>
> Date: Tue, 10 Apr 2001 13:38:01 +0200 (CEST)
> 
> > Guile provides
> > 
> > SCM gh_eval_file_with_catch(const char *scheme_code, scm_catch_handler_t 
> > handler);
> > 
> > for just that reason.  It evaluates a file, and if an exception
> > occurs, `handler' is called.  The handler data type is declared like
> > this:
> > 
> > 
> > typedef SCM (*scm_catch_handler_t) (void *data,
> >                                     SCM tag, SCM throw_args);
> > 
> > 
> > `tag' is the exception tag (a symbol like `misc-error', `out-of-range'
> > or something) and `throw_args' depends on the type of exception.
> 
> Sounds good, but: Is just that function called and guile exit()s anyway ?
> Or does gh_eval_file_with_catch() return an error value ?

It does not exit, and no error value is returned.  If you want to
communicate the error condition out of the catch handler, you have to
set some variable, or call some reporting function.

Regards,
  'martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]