/* * call-seq: * exception.backtrace_locations -> array * * Returns any backtrace associated with the exception. This method is * similar to Exception#backtrace, but the backtrace is an array of * Thread::Backtrace::Location. * * Now, this method is not affected by Exception#set_backtrace(). */ static VALUE exc_backtrace_locations(VALUE exc) { VALUE obj; obj = rb_attr_get(exc, id_bt_locations); if (!NIL_P(obj)) { obj = rb_backtrace_to_location_ary(obj); } return obj; }
/* * call-seq: * exception.backtrace_locations -> array * * Returns any backtrace associated with the exception. This method is * similar to Exception#backtrace, but the backtrace is an array of * Thread::Backtrace::Location. * * Now, this method is not affected by Exception#set_backtrace(). */ static VALUE exc_backtrace_locations(VALUE exc) { ID bt_locations; VALUE obj; CONST_ID(bt_locations, "bt_locations"); obj = rb_attr_get(exc, bt_locations); if (!NIL_P(obj)) { obj = rb_backtrace_to_location_ary(obj); } return obj; }