Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Macros | Functions
eval_error.c File Reference

Go to the source code of this file.

## Macros
#define | write_warn(str, x) (NIL_P(str) ? warn_print(x) : (void)rb_str_cat_cstr(str, x))
#define | write_warn2(str, x, l) (NIL_P(str) ? warn_print2(x, l) : (void)rb_str_cat(str, x, l))
#define | warn_print(x) rb_write_error(x)
#define | warn_print2(x, l) rb_write_error2((x),(l))
#define | write_warn_str(str, x) NIL_P(str) ? rb_write_error_str(x) : (void)rb_str_concat((str), (x))
#define | warn_print_str(x) rb_write_error_str(x)
#define | CSI_BEGIN "\033["
#define | CSI_SGR "m"
#define | TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5)
#define | TRACE_HEAD 8
#define | TRACE_TAIL 5
#define | APPEND(s, l) (memcpy(p, s, l), p += (l))
#define | undef_mesg_for(v, k) rb_fstring_lit("undefined"v" method `%1$s' for "k" `%2$s'")
#define | undef_mesg(v)
#define | inaccessible_mesg_for(v, k) rb_fstring_lit("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
VALUE | rb_get_message (VALUE exc)
void | rb_error_write (VALUE errinfo, VALUE emesg, VALUE errat, VALUE str, VALUE highlight, VALUE reverse)
void | rb_ec_error_print (rb_execution_context_t *volatile ec, volatile VALUE errinfo)
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)

## Macro Definition Documentation

## ◆ APPEND

#define APPEND | ( |  | s,
|  |  | l
| ) |  | (memcpy(p, s, l), p += (l))

## ◆ CSI_BEGIN

#define CSI_BEGIN "\033["

Definition at line 123 of file eval_error.c.

## ◆ CSI_SGR

#define CSI_SGR "m"

Definition at line 124 of file eval_error.c.

## ◆ inaccessible_mesg

#define inaccessible_mesg | ( |  | v | ) |

Value:
( \
is_mod ? \
inaccessible_mesg_for(v, "module") : \
inaccessible_mesg_for(v, "class"))

Definition at line 401 of file eval_error.c.

## ◆ inaccessible_mesg_for

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

Definition at line 400 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"))

Definition at line 373 of file eval_error.c.

## ◆ undef_mesg_for

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

Definition at line 372 of file eval_error.c.

## ◆ unknown_longjmp_status

#define unknown_longjmp_status | ( |  | status | ) | rb_bug("Unknown longjmp status %d", status)

Definition at line 428 of file eval_error.c.

## ◆ warn_print

#define warn_print | ( |  | x | ) | rb_write_error(x)

Definition at line 17 of file eval_error.c.

## ◆ warn_print2

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

Definition at line 20 of file eval_error.c.

## ◆ warn_print_str

#define warn_print_str | ( |  | x | ) | rb_write_error_str(x)

Definition at line 23 of file eval_error.c.

## ◆ write_warn

#define write_warn | ( |  | str,
|  |  | x
| ) |  | (NIL_P(str) ? warn_print(x) : (void)rb_str_cat_cstr(str, x))

Definition at line 6 of file eval_error.c.

## ◆ write_warn2

#define write_warn2 | ( |  | str,
|  |  | x,
|  |  | l
| ) |  | (NIL_P(str) ? warn_print2(x, l) : (void)rb_str_cat(str, x, l))

Definition at line 8 of file eval_error.c.

## ◆ write_warn_str

#define write_warn_str | ( |  | str,
|  |  | x
| ) |  | NIL_P(str) ? rb_write_error_str(x) : (void)rb_str_concat((str), (x))

Definition at line 22 of file eval_error.c.

## Function Documentation

## ◆ rb_ec_error_print()

void rb_ec_error_print | ( | rb_execution_context_t *volatile | ec,
|  | volatile VALUE | errinfo
| ) |  |

Definition at line 346 of file eval_error.c.

References EC_EXEC_TAG, EC_POP_TAG, EC_PUSH_TAG, rb_execution_context_struct::errinfo, NIL_P, Qnil, Qundef, rb_execution_context_struct::raised_flag, rb_ec_raised_clear, rb_ec_raised_set, rb_error_write(), rb_get_backtrace(), rb_get_message(), and TAG_NONE.

Referenced by rb_f_abort().

## ◆ rb_print_inaccessible()

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

Definition at line 407 of file eval_error.c.

References ID2SYM, inaccessible_mesg, klass, 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.

## ◆ rb_print_undef()

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

Definition at line 379 of file eval_error.c.

References ID2SYM, klass, 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.

## ◆ rb_print_undef_str()

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

Definition at line 394 of file eval_error.c.

References klass, name, rb_name_err_raise_str, RB_TYPE_P, T_MODULE, and undef_mesg.

undef_mesg_for
#define undef_mesg_for(v, k)
Definition: eval_error.c:372
v
int VALUE v
Definition: rb_mjit_min_header-2.7.0.h:12332
inaccessible_mesg_for
#define inaccessible_mesg_for(v, k)
Definition: eval_error.c:400