This is the mail archive of the guile@cygnus.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] |
Daniel Burrows wrote: > > Hello. > > I'm in the process of embedding Guile into a C program, primarily by allowing > the user (via configuration files and some runtime-entered scripts) to create > "hook" procedures that get called in response to program events. Currently, > I'm experiencing a high level of frustration due to the fact that any error in > the user-provided scripts will cause my program to abort with a Scheme error. > I've tried (based on the tiny amount of documentation available and a fair > amount of code-examination) to set up a catch handler for the main program body; > however, even when my catch handler is invoked, my program still terminates > on a Scheme error. Is there any way to get around this feature? Try taking a look at callbacks.c in the scwm distribution, I think it solves many of the same problems you want to solve. It provides funstions to call hooks that trap errors and provide complete error messages with a backtrace (and don't kill the program). - Maciej Stachowiak