If you write a ruby method as a function in C that uses rb_raise, part of the function after the call will not be canceled, and the program will stop, and you will think that it is rb_raiseused exit(). But if you choose an exception in ruby, for example:
begin
method_that_raises_an_exception
rescue
end
puts 'You wil still get here.'
The ruby code will continue, but your function will stop excecuting. How to do it rb_raise?
source
share