Queries regarding ruby exception handling

Hi

I am using Ruby 1.8.6 in embedded with C++ application and in future I
will use Ruby 1.9. I have following queries for Ruby exception handling.
Please give reply with the answers or provide me information about any
reference document that can help me for the same.

  1. We can catch and handle Ruby exceptions using rb_protect C API. Is
    there any other way or other C APIs to do the same things?
  2. From following list of Ruby C APIs:
  • Which API can throw Ruby exception or any other exception?
  • If any API is throwing exception then which exception and in which
    condition?

List of C APIs that I am using:
rb_require
rb_gv_get
rb_obj_call_init
rb_exc_raise
rb_funcall
rb_funcall3
rb_intern
Data_Get_Struct
Data_Wrap_Struct
rb_iv_set
rb_iv_get
rb_obj_is_instance_of
rb_define_class
rb_define_class_under
rb_define_const
rb_const_get
rb_ary_shift
rb_ary_new2
rb_ary_store
rb_class_new_instance
rb_define_module
rb_define_module_under
rb_define_method
rb_define_singleton_method
rb_ivar_defined
rb_float_new
rb_str_new2
RSTRING
RARRAY

Regards
Chirag

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs