eval_error.c File Reference

Go to the source code of this file.

Defines

#define warn_print(x)   rb_write_error(x)
#define warn_print2(x, l)   rb_write_error2((x),(l))
#define warn_print_str(x)   rb_write_error_str(x)
#define TRACE_MAX   (TRACE_HEAD+TRACE_TAIL+5)
#define TRACE_HEAD   8
#define TRACE_TAIL   5

Functions

static void warn_printf (const char *fmt,...)
static void error_pos (void)
static VALUE get_backtrace (VALUE info)
VALUE rb_get_backtrace (VALUE info)
VALUE rb_exc_set_backtrace (VALUE exc, VALUE bt)
static void set_backtrace (VALUE info, VALUE bt)
static void error_print (void)
void ruby_error_print (void)
void rb_print_undef (VALUE klass, ID id, int scope)
void rb_print_undef_str (VALUE klass, VALUE name)
static int sysexit_status (VALUE err)
static int error_handle (int ex)


Define Documentation

#define TRACE_HEAD   8

Referenced by error_print().

#define TRACE_MAX   (TRACE_HEAD+TRACE_TAIL+5)

Referenced by error_print().

#define TRACE_TAIL   5

Referenced by error_print().

#define warn_print (  )     rb_write_error(x)

Definition at line 18 of file eval_error.c.

Referenced by error_handle(), error_print(), rb_sys_warning(), rb_warn(), and rb_warning().

#define warn_print2 ( x,
 )     rb_write_error2((x),(l))

Definition at line 19 of file eval_error.c.

Referenced by error_print().

#define warn_print_str (  )     rb_write_error_str(x)

Definition at line 20 of file eval_error.c.

Referenced by error_print().


Function Documentation

static int error_handle ( int  ex  )  [static]

Definition at line 245 of file eval_error.c.

References rb_thread_struct::errinfo, error_pos(), error_print(), EXIT_FAILURE, EXIT_SUCCESS, GET_THREAD(), rb_bug(), rb_eSignal, rb_eSystemExit, rb_obj_is_instance_of(), rb_obj_is_kind_of(), rb_threadptr_reset_raised(), rb_threadptr_set_raised(), sysexit_status(), TAG_BREAK, TAG_FATAL, TAG_MASK, TAG_NEXT, TAG_RAISE, TAG_REDO, TAG_RETRY, TAG_RETURN, TAG_THROW, VALUE, warn_print, and warn_printf().

Referenced by rb_exec_end_proc(), ruby_cleanup(), and ruby_options().

static void error_pos ( void   )  [static]

Definition at line 23 of file eval_error.c.

References rb_frame_callee(), rb_id2name(), rb_sourcefile, rb_sourceline(), and warn_printf().

Referenced by error_handle(), and error_print().

static void error_print ( void   )  [static]

Definition at line 80 of file eval_error.c.

References CLASS_OF, rb_thread_struct::errinfo, error_pos(), get_backtrace(), GET_THREAD(), len, NIL_P, PRIsVALUE, Qnil, Qundef, rb_thread_struct::raised_flag, RARRAY_AREF, RARRAY_LEN, rb_check_funcall(), rb_check_string_type(), rb_class_name(), rb_eRuntimeError, rb_eSysStackError, rb_intern, rb_sourcefile, rb_sourceline(), rb_thread_raised_clear, rb_thread_raised_set, RB_TYPE_P, RSTRING_LEN, RSTRING_PTR, T_STRING, tail, TH_EXEC_TAG, TH_POP_TAG, TH_PUSH_TAG, TRACE_HEAD, TRACE_MAX, TRACE_TAIL, VALUE, warn_print, warn_print2, warn_print_str, and warn_printf().

Referenced by error_handle(), ruby_error_print(), and ruby_init().

static VALUE get_backtrace ( VALUE  info  )  [static]

Definition at line 44 of file eval_error.c.

References NIL_P, Qnil, rb_check_backtrace(), rb_funcall(), and rb_intern.

Referenced by errat_getter(), error_print(), rb_get_backtrace(), and setup_exception().

VALUE rb_exc_set_backtrace ( VALUE  exc,
VALUE  bt 
)

Definition at line 807 of file error.c.

References exc_set_backtrace().

Referenced by set_backtrace().

VALUE rb_get_backtrace ( VALUE  info  ) 

Definition at line 55 of file eval_error.c.

References get_backtrace().

Referenced by eval_string_with_cref().

void rb_print_undef ( VALUE  klass,
ID  id,
int  scope 
)

Definition at line 212 of file eval_error.c.

References NOEX_PRIVATE, NOEX_PROTECTED, NOEX_PUBLIC, PRIsVALUE, QUOTE_ID, rb_class_name(), rb_name_error(), RB_TYPE_P, and T_MODULE.

Referenced by mnew_from_me(), rb_alias(), rb_export_method(), and rb_mod_modfunc().

void rb_print_undef_str ( VALUE  klass,
VALUE  name 
)

Definition at line 229 of file eval_error.c.

References PRIsVALUE, QUOTE, rb_class_name(), rb_name_error_str(), RB_TYPE_P, and T_MODULE.

Referenced by rb_mod_alias_method(), and set_method_visibility().

void ruby_error_print ( void   ) 

Definition at line 206 of file eval_error.c.

References error_print().

Referenced by rb_f_abort().

static void set_backtrace ( VALUE  info,
VALUE  bt 
) [static]

Definition at line 63 of file eval_error.c.

References CLASS_OF, rb_backtrace_p(), rb_backtrace_to_str_ary(), rb_exc_set_backtrace(), rb_funcall(), rb_intern, and rb_method_basic_definition_p().

Referenced by errat_setter(), make_exception(), and setup_exception().

static int sysexit_status ( VALUE  err  )  [static]

Definition at line 238 of file eval_error.c.

References NUM2INT, rb_iv_get(), and VALUE.

Referenced by error_handle(), and ruby_cleanup().

static void warn_printf ( const char *  fmt,
  ... 
) [static]

Definition at line 7 of file eval_error.c.

References args, rb_vsprintf(), rb_write_error_str(), va_init_list, and VALUE.

Referenced by error_handle(), error_pos(), error_print(), and setup_exception().


Generated on 19 Jul 2016 for Ruby by  doxygen 1.4.7