On 20.10.2007 17:19, Gary wrote:
> Thank you mental!!!  It works.  I should have figured it out myself,
> but I needed your help.
> 
> I'm I bit confused about a C-linkage interface to the C++ portion.  Is
> this going to be more than wrapping the C++ calls in try catch(...)
> In other words having something like
> 
> extern "C" VALUE t_init(VALUE self)
> {
>   //declare any Ruby C++ data conversion vars in C
>   try
>     {
>     //call C++ functions
>     }
>   catch(...)
>     {
>     //process exceptions
>     }
>   //Do any data interactions between C++ and Ruby
> }
> 
> Once again, thanks!  I spent several hours stumped.

That'll probably suffice.  You might get a bit better results by 
catching explicit exception types and converting them to Ruby world 
exceptions.  Other than that your code should prevent any havoc caused 
by C++ exceptions raised into the Ruby interpreter.

Kind regards

	robert