6 #ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P 7 #define warn_print(x) RB_GNUC_EXTENSION_BLOCK( \ 8 (__builtin_constant_p(x)) ? \ 9 rb_write_error2((x), (long)strlen(x)) : \ 13 #define warn_print(x) rb_write_error(x) 15 #define warn_print2(x,l) rb_write_error2((x),(l)) 16 #define warn_print_str(x) rb_write_error_str(x) 37 if (sourceline == 0) {
42 sourcefile, sourceline,
81 const char *
volatile einfo;
93 else if (errat ==
Qundef) {
135 const char *tail = 0;
140 if ((tail = memchr(einfo,
'\n', elen)) != 0) {
153 if (tail ? einfo[elen-1] !=
'\n' : !epath)
warn_print2(
"\n", 1);
162 #define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5) 166 for (i = 1; i <
len; i++) {
190 #define undef_mesg_for(v, k) rb_fstring_cstr("undefined"v" method `%1$s' for "k" `%2$s'") 191 #define undef_mesg(v) ( \ 193 undef_mesg_for(v, "module") : \ 194 undef_mesg_for(v, "class")) 218 #define inaccessible_mesg_for(v, k) rb_fstring_cstr("method `%1$s' for "k" `%2$s' is "v) 219 #define inaccessible_mesg(v) ( \ 221 inaccessible_mesg_for(v, "module") : \ 222 inaccessible_mesg_for(v, "class")) 246 #define unknown_longjmp_status(status) \ 247 rb_bug("Unknown longjmp status %d", status) 280 warn_print(
"retry outside of rescue clause\n");
#define warn_print2(x, l)
void rb_print_undef(VALUE klass, ID id, rb_method_visibility_t visi)
#define rb_name_err_raise_str(mesg, recv, name)
static void error_pos(void)
static void set_backtrace(VALUE info, VALUE bt)
static int sysexit_status(VALUE err)
void rb_print_undef_str(VALUE klass, VALUE name)
VALUE rb_ivar_get(VALUE, ID)
VALUE rb_obj_is_kind_of(VALUE, VALUE)
#define RB_TYPE_P(obj, type)
VALUE rb_class_name(VALUE)
static int error_handle(int ex)
int rb_threadptr_set_raised(rb_thread_t *th)
void rb_print_inaccessible(VALUE klass, ID id, rb_method_visibility_t visi)
#define warn_print_str(x)
VALUE rb_exc_set_backtrace(VALUE exc, VALUE bt)
void rb_threadptr_error_print(rb_thread_t *volatile th, volatile VALUE errinfo)
int rb_backtrace_p(VALUE obj)
#define rb_thread_raised_clear(th)
static VALUE error_pos_str(void)
VALUE rb_backtrace_to_str_ary(VALUE obj)
VALUE rb_str_subseq(VALUE, long, long)
VALUE rb_sprintf(const char *format,...)
#define rb_thread_raised_set(th, f)
int rb_threadptr_reset_raised(rb_thread_t *th)
VALUE rb_check_funcall(VALUE, ID, int, const VALUE *)
static void error_print(rb_thread_t *th)
void ruby_error_print(void)
register unsigned int len
VALUE rb_obj_is_instance_of(VALUE, VALUE)
#define RARRAY_AREF(a, i)
VALUE rb_check_string_type(VALUE)
#define inaccessible_mesg(v)
int rb_method_basic_definition_p(VALUE, ID)
VALUE rb_source_location(int *pline)
VALUE rb_get_backtrace(VALUE exc)
#define unknown_longjmp_status(status)