From: Peter Zotov Date: 2012-05-13T00:12:45+09:00 Subject: Re: [C exten] How to raise a Exception instance? Iñaki Baz Castillo писал 12.05.2012 18:30: > Hi, in Ruby land this is easy: > > ----------------------------------------------------- > error = StandardError.new "my error message" > > raise error > > => StandardError: my error message > (backtrace..) > ----------------------------------------------------- > > > How to do the same at C level having a StandardError instance stored > within a VALUE error? > > I've looked for the definition of "raise" in Ruby 1.9.3 sources. I > know that using rb_funcall for Kernel module and method "raise" could > work, but maybe there is something a bit better. > > Thanks a lot. Try rb_exc_raise: http://rxr.whitequark.org/mri/source/eval.c#457 -- WBR, Peter Zotov.