Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Macros | |
#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 |
#define | undef_mesg_for(v, k) rb_fstring_cstr("undefined"v" method `%1$s' for "k" `%2$s'") |
#define | undef_mesg(v) |
#define | inaccessible_mesg_for(v, k) rb_fstring_cstr("method `%1$s' for "k" `%2$s' is "v) |
#define | inaccessible_mesg(v) |
#define | unknown_longjmp_status(status) rb_bug("Unknown longjmp status %d", status) |
Functions | |
static VALUE | error_pos_str (void) |
static void | error_pos (void) |
static void | set_backtrace (VALUE info, VALUE bt) |
static void | error_print (rb_thread_t *th) |
void | rb_threadptr_error_print (rb_thread_t *volatile th, volatile VALUE errinfo) |
void | ruby_error_print (void) |
void | rb_print_undef (VALUE klass, ID id, rb_method_visibility_t visi) |
void | rb_print_undef_str (VALUE klass, VALUE name) |
void | rb_print_inaccessible (VALUE klass, ID id, rb_method_visibility_t visi) |
static int | sysexit_status (VALUE err) |
static int | error_handle (int ex) |
#define inaccessible_mesg | ( | v | ) |
Definition at line 219 of file eval_error.c.
Referenced by rb_print_inaccessible().
#define inaccessible_mesg_for | ( | v, | |
k | |||
) | rb_fstring_cstr("method `%1$s' for "k" `%2$s' is "v) |
Definition at line 218 of file eval_error.c.
#define TRACE_HEAD 8 |
Referenced by rb_threadptr_error_print().
#define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5) |
Referenced by rb_threadptr_error_print().
#define TRACE_TAIL 5 |
Referenced by rb_threadptr_error_print().
#define undef_mesg | ( | v | ) |
Definition at line 191 of file eval_error.c.
Referenced by rb_print_undef(), and rb_print_undef_str().
#define undef_mesg_for | ( | v, | |
k | |||
) | rb_fstring_cstr("undefined"v" method `%1$s' for "k" `%2$s'") |
Definition at line 190 of file eval_error.c.
#define unknown_longjmp_status | ( | status | ) | rb_bug("Unknown longjmp status %d", status) |
Definition at line 246 of file eval_error.c.
Referenced by error_handle(), and rb_jump_tag().
#define warn_print | ( | x | ) | rb_write_error(x) |
Definition at line 13 of file eval_error.c.
Referenced by error_handle(), and rb_threadptr_error_print().
#define warn_print2 | ( | x, | |
l | |||
) | rb_write_error2((x),(l)) |
Definition at line 15 of file eval_error.c.
Referenced by rb_threadptr_error_print().
#define warn_print_str | ( | x | ) | rb_write_error_str(x) |
Definition at line 16 of file eval_error.c.
Referenced by error_pos(), rb_threadptr_error_print(), and setup_exception().
|
static |
Definition at line 250 of file eval_error.c.
References rb_thread_struct::errinfo, error_pos(), error_print(), EXIT_FAILURE, EXIT_SUCCESS, GET_THREAD, id_signo, INT2FIX, rb_eSignal, rb_eSystemExit, rb_ivar_get(), 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, unknown_longjmp_status, and warn_print.
Referenced by rb_exec_end_proc(), ruby_cleanup(), and ruby_options().
|
static |
Definition at line 21 of file eval_error.c.
References error_pos_str(), NIL_P, and warn_print_str.
Referenced by error_handle(), and rb_threadptr_error_print().
|
static |
Definition at line 30 of file eval_error.c.
References PRIsVALUE, Qnil, rb_frame_callee(), rb_id2str, rb_source_location(), and rb_sprintf().
Referenced by error_pos().
|
static |
Definition at line 70 of file eval_error.c.
References rb_thread_struct::errinfo, and rb_threadptr_error_print().
Referenced by error_handle(), ruby_error_print(), and ruby_init().
void rb_print_inaccessible | ( | VALUE | klass, |
ID | id, | ||
rb_method_visibility_t | visi | ||
) |
Definition at line 225 of file eval_error.c.
References ID2SYM, inaccessible_mesg, METHOD_VISI_MASK, METHOD_VISI_PRIVATE, METHOD_VISI_PROTECTED, METHOD_VISI_PUBLIC, METHOD_VISI_UNDEF, rb_name_err_raise_str, RB_TYPE_P, T_MODULE, and UNREACHABLE.
Referenced by mnew_internal().
void rb_print_undef | ( | VALUE | klass, |
ID | id, | ||
rb_method_visibility_t | visi | ||
) |
Definition at line 197 of file eval_error.c.
References ID2SYM, METHOD_VISI_MASK, METHOD_VISI_PRIVATE, METHOD_VISI_PROTECTED, METHOD_VISI_PUBLIC, METHOD_VISI_UNDEF, rb_name_err_raise_str, RB_TYPE_P, T_MODULE, undef_mesg, and UNREACHABLE.
Referenced by mnew_internal(), rb_alias(), rb_export_method(), and rb_mod_modfunc().
Definition at line 212 of file eval_error.c.
References rb_name_err_raise_str, RB_TYPE_P, T_MODULE, and undef_mesg.
Referenced by rb_mod_alias_method(), and set_method_visibility().
void rb_threadptr_error_print | ( | rb_thread_t *volatile | th, |
volatile VALUE | errinfo | ||
) |
Definition at line 76 of file eval_error.c.
References CLASS_OF, rb_thread_struct::errinfo, error_pos(), 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_get_backtrace(), rb_intern, rb_sprintf(), rb_str_subseq(), rb_thread_raised_clear, rb_thread_raised_set, RB_TYPE_P, RSTRING_LEN, RSTRING_PTR, T_STRING, TH_EXEC_TAG, TH_POP_TAG, TH_PUSH_TAG, TRACE_HEAD, TRACE_MAX, TRACE_TAIL, warn_print, warn_print2, and warn_print_str.
Referenced by error_print(), and thread_start_func_2().
void ruby_error_print | ( | void | ) |
Definition at line 185 of file eval_error.c.
References error_print(), and GET_THREAD.
Referenced by rb_f_abort().
Definition at line 53 of file eval_error.c.
References CLASS_OF, rb_backtrace_p(), rb_backtrace_to_str_ary(), rb_check_funcall(), rb_exc_set_backtrace(), rb_intern, and rb_method_basic_definition_p().
Referenced by errat_setter(), make_exception(), and setup_exception().
|
static |
Definition at line 240 of file eval_error.c.
References id_status, NUM2INT, and rb_ivar_get().
Referenced by error_handle(), and ruby_cleanup().