Ruby 2.0.0p247(2013-06-27revision41674)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Functions
eval_error.c File Reference
This graph shows which files directly or indirectly include this file:

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 | 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)

## Macro Definition 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 | ( |  | x) |  | rb_write_error(x)

Definition at line 18 of file eval_error.c.

Referenced by error_handle(), and error_print().

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

Definition at line 19 of file eval_error.c.

Referenced by error_print().

## Function Documentation

static int error_handle | ( | int | ex) |  |
| static

Definition at line 239 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, 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 22 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 78 of file eval_error.c.

References CLASS_OF, rb_thread_struct::errinfo, error_pos(), get_backtrace(), GET_THREAD(), i, NIL_P, Qnil, rb_thread_struct::raised_flag, RARRAY_LEN, RARRAY_PTR, rb_class_name(), rb_eRuntimeError, rb_eSysStackError, rb_funcall(), rb_intern, rb_sourcefile, rb_sourceline(), rb_thread_raised_clear, rb_thread_raised_set, RB_TYPE_P, RSTRING_LEN, RSTRING_PTR, StringValue, T_STRING, tail, TH_EXEC_TAG, TH_POP_TAG, TH_PUSH_TAG, TRACE_HEAD, TRACE_MAX, TRACE_TAIL, warn_print, warn_print2, and warn_printf().

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

static VALUE get_backtrace | ( | VALUE | info) |  |
| static

Definition at line 42 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 747 of file error.c.

References exc_set_backtrace().

Referenced by set_backtrace().

VALUE rb_get_backtrace | ( | VALUE | info) |  |

Definition at line 53 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 206 of file eval_error.c.

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

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

void rb_print_undef_str | ( | VALUE | klass,
|  | VALUE | name
| ) |  |

Definition at line 223 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 200 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 61 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 232 of file eval_error.c.

References NUM2INT, and rb_iv_get().

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, buf, rb_write_error(), va_init_list, and vsnprintf.

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