From: nobu.nokada@... Date: 2004-08-26T20:15:43+09:00 Subject: Re: rb_rescue2 - throwing exception in rescue_func Hi, At Thu, 26 Aug 2004 09:28:00 +0900, Yukihiro Matsumoto wrote in [ruby-talk:110513]: > |Is it simply not possible to "transform" a Ruby exception into a C++ > |exception using rb_rescue2()? Will I have to rewrite SWIG to use rb_protect()? > > Your sample code uses rb_rescue() that only catches StandardError. > If you want to catch all exceptions, specify rb_eException to the last > argument of rb_rescue2(). I have no knowledge about SWIG generated > code, but I hope this helps. To deal with "retry", both of rb_rescue() and rb_rescue2() use PROT_TAG() while calling rescue_func, and throwing C++ exception leaves it. It should be fatal. -- Nobu Nakada