Ruby  2.4.2p198(2017-09-14revision59899)
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 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)
 

Macro Definition Documentation

◆ inaccessible_mesg

#define inaccessible_mesg (   v)
Value:
( \
is_mod ? \
inaccessible_mesg_for(v, "module") : \
inaccessible_mesg_for(v, "class"))
#define inaccessible_mesg_for(v, k)
Definition: eval_error.c:218

Definition at line 219 of file eval_error.c.

Referenced by rb_print_inaccessible().

◆ inaccessible_mesg_for

#define inaccessible_mesg_for (   v,
 
)    rb_fstring_cstr("method `%1$s' for "k" `%2$s' is "v)

Definition at line 218 of file eval_error.c.

◆ TRACE_HEAD

#define TRACE_HEAD   8

◆ TRACE_MAX

#define TRACE_MAX   (TRACE_HEAD+TRACE_TAIL+5)

◆ TRACE_TAIL

#define TRACE_TAIL   5

◆ undef_mesg

#define undef_mesg (   v)
Value:
( \
is_mod ? \
undef_mesg_for(v, "module") : \
undef_mesg_for(v, "class"))
#define undef_mesg_for(v, k)
Definition: eval_error.c:190

Definition at line 191 of file eval_error.c.

Referenced by rb_print_undef(), and rb_print_undef_str().

◆ undef_mesg_for

#define undef_mesg_for (   v,
 
)    rb_fstring_cstr("undefined"v" method `%1$s' for "k" `%2$s'")

Definition at line 190 of file eval_error.c.

◆ unknown_longjmp_status

#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().

◆ warn_print

#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().

◆ warn_print2

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

Definition at line 15 of file eval_error.c.

Referenced by rb_threadptr_error_print().

◆ warn_print_str

#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().

Function Documentation

◆ error_handle()

static int error_handle ( int  ex)
static

◆ error_pos()

static void error_pos ( void  )
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().

◆ error_pos_str()

static VALUE error_pos_str ( void  )
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().

◆ error_print()

static void error_print ( rb_thread_t th)
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().

◆ rb_print_inaccessible()

void rb_print_inaccessible ( VALUE  klass,
ID  id,
rb_method_visibility_t  visi 
)

◆ rb_print_undef()

void rb_print_undef ( VALUE  klass,
ID  id,
rb_method_visibility_t  visi 
)

◆ rb_print_undef_str()

void rb_print_undef_str ( VALUE  klass,
VALUE  name 
)

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

◆ rb_threadptr_error_print()

void rb_threadptr_error_print ( rb_thread_t *volatile  th,
volatile VALUE  errinfo 
)

◆ ruby_error_print()

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

◆ set_backtrace()

static void set_backtrace ( VALUE  info,
VALUE  bt 
)
static

◆ sysexit_status()

static int sysexit_status ( VALUE  err)
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().