dev-serveez
[Top][All Lists]
Advanced

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

Re: [dev-serveez] guile switch


From: stefan
Subject: Re: [dev-serveez] guile switch
Date: Tue, 10 Apr 2001 13:38:01 +0200 (CEST)

On Mon, 9 Apr 2001, Martin Grabmueller wrote:

> > From: stefan <address@hidden>
> > Date: Mon, 9 Apr 2001 15:42:35 +0200 (CEST)
> > 
> > Hello Serveez'ers,
> >   some days ago Raimi started to implemented the configuration file parser
> > for serveez using guile. Me tried to play around with that and noticed
> > guile to terminate the program when raising an error within the loaded
> > config file. It just states an ERROR: which I cannot interprete and
> > exit()s. We are using gh_eval_file() or something. Is it possible to
> > "catch exception" ??? and make it returning some value on failure for
> > better error checking ?
> 
> 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 ?

Thanks in advance,
        address@hidden




reply via email to

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