[plt-scheme] exceptions and extensions

From: Pedro Pinto (ppinto at cs.cmu.edu)
Date: Sat Apr 5 18:56:01 EST 2003

hi there,

I am trying to write a mzscheme extension using Microsoft Managed C++ and I
have come across a problem with exceptions. The following code:

void t()
{
    throw 0;
}

Scheme_Object *test(int argc, Scheme_Object **argv)
{
    try
    {
        t();
    }
    catch (...)
    {
        scheme_signal_error("uups");
    }
    return scheme_void;
}


will kill MzScheme the second time test is invoked (the first time it
displays "uups"). Does anyone have any ideas as to why?

Thanks in advance,
-pp



Posted on the users mailing list.