In ruby,
begin
# ...
rescue
# ...
end
won't catch exceptions that aren't subclasses of StandardError
. In C,
rb_rescue(x, Qnil, y, Qnil);
VALUE x(void) { /* ... */ return Qnil; }
VALUE y(void) { /* ... */ return Qnil; }
will do the same thing. How can I rescue Exception => e
from a ruby C extension (instead of just rescue => e
)?