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

Raising an exception within C?



Greetings, all.

I'm working on a C extension to MzScheme, and I'd like to have some of my
new primitive functions throw exceptions in certain circumstances not
covered by the existing set of primitive exceptions.

I know how to define the structs that I'm going to use as exception
objects, but it's unclear how to raise those from within C, as
scheme_raise_exn doesn't seem to apply here.  Is this in fact possible, or
do I have to return an error code out to a Scheme wrapper function which
then throws the appropriate object?

Thanks,

Richard