guile-user
[Top][All Lists]
Advanced

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

Re: Exceptions from C code / handling them in scheme


From: Martin Grabmueller
Subject: Re: Exceptions from C code / handling them in scheme
Date: Tue, 03 Apr 2001 09:14:57 +0200

> From: Richard Guenther <address@hidden>
> Date: Sun, 1 Apr 2001 18:52:24 +0200 (CEST)
> 
> I should have told you that I'm trying to solve the problem
> of handling errors in C code that has been called from scheme
> code that has been called from C code... (at the time being
> guile just quits my C program if f.i. SCM_ASSERT fails - which
> is not very nice).

This is because Guile installs a standard error handler which prints a
message and terminates the program.

If you want to load a file of Scheme code and install an error handler by 
yourself, have a look at

SCM gh_eval_file_with_catch(const char *scheme_code, scm_catch_handler_t 
handler);

which lets you install a C function as an error handler.

Regards,
  'martin



reply via email to

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