[plt-scheme] How to do exception catching in C code?

From: Chiyuan Zhang (pluskid at gmail.com)
Date: Sun Jun 1 08:19:55 EDT 2008

Hi all,

I'm embedding mzscheme to other program. I want to handle the
exception and know precisely what happened. I found in the
"Exceptions and Escape Continuations" chapter that the simplest way is
to mix Scheme code with C code. I tried that way and found I was
encountering some strange errors. I'm not sure what part of my code
has something wrong, but I'm also concerning that there will be a
performance issue with this method.

So I would like to try the "harder" way. It is mentioned that there
"MZSCHEME_INIT_EXN_HANDLER" etc. But where can I find some more
details about those parameters? I.e. what exactly do they do? If I
want to install my own handler, what prototype and conventions should
they follow?

Any hints?


Posted on the users mailing list.