[plt-scheme] exceptions and extensions
Thanks for the pointer. As you suspected everything works fine with plain
C++. The problem occurs when the try/catch block is managed code. Replacing
the previous sample with:
void t()
{
throw 0;
}
#pragma unmanaged
Scheme_Object *test(int argc, Scheme_Object **argv)
{
try
{
t();
}
catch (...)
{
scheme_signal_error("uups");
}
return scheme_void;
}
#pragma managed
Produces the desired result.
-pp
----- Original Message -----
From: "Matthew Flatt" <mflatt at cs.utah.edu>
To: "Pedro Pinto" <ppinto at cs.cmu.edu>
Cc: <plt-scheme at qua.cs.brown.edu>
Sent: Sunday, April 06, 2003 12:35 PM
Subject: Re: [plt-scheme] exceptions and extensions
> Do you get different results compiling the above code as plain old C++
> instead of Managed C++?
>
> I don't know what MC++ might require of the environment. Possibly MC++
> doesn't like the way that scheme_signal_error() uses scheme_longjmp()
> to escape from test(). If that's the case, you may need to catch all
> MzScheme escapes in MC++ code using scheme_setjmp(), and then get out
> of MC++ completely before continuing with scheme_longjmp().
>
> Matthew
>
>