From: ts Date: 2001-09-23T18:50:45+09:00 Subject: [ruby-talk:21596] Re: Returnin own C++ type from ruby method >>>>> "B" == Bernhard Gl�ck writes: B> Just another question... I would like to catch all exceptions thrown B> by Ruby in my C++ programm (which embeds the Ruby interpreter ) ( just B> to write them to my special log system and resend them ..... ) B> I think this should be possible using "rb_catch" etc... but howto ? I No rb_catch is for #catch * use rb_rescue() to catch rb_eStandardError. this is equivalent to begin rescue end * rb_rescue2() to catch rb_eException. this is equivalent to begin rescue Name1 rescue Name2 ... end * rb_protect() to catch all errors (even fatal) * finally if you want to catch rb_bug(), you must catch abort(3) You have also rb_eval_string_protect(), rb_eval_string_wrap() -- Guy Decoux