/src/ruby/internal/error.h
Line | Count | Source |
1 | | #ifndef INTERNAL_ERROR_H /*-*-C-*-vi:se ft=c:*/ |
2 | | #define INTERNAL_ERROR_H |
3 | | /** |
4 | | * @author Ruby developers <ruby-core@ruby-lang.org> |
5 | | * @copyright This file is a part of the programming language Ruby. |
6 | | * Permission is hereby granted, to either redistribute and/or |
7 | | * modify this file, provided that the conditions mentioned in the |
8 | | * file COPYING are met. Consult the file for details. |
9 | | * @brief Internal header for Exception. |
10 | | */ |
11 | | #include "ruby/internal/config.h" |
12 | | #include <stdarg.h> /* for va_list */ |
13 | | #include "internal/string.h" /* for rb_fstring_cstr */ |
14 | | #include "ruby/internal/stdbool.h" /* for bool */ |
15 | | #include "ruby/encoding.h" /* for rb_encoding */ |
16 | | #include "ruby/intern.h" /* for rb_exc_raise */ |
17 | | #include "ruby/ruby.h" /* for enum ruby_value_type */ |
18 | | |
19 | | #ifdef Check_Type |
20 | | # undef Check_Type /* in ruby/ruby.h */ |
21 | | #endif |
22 | | |
23 | | #ifdef rb_raise_static |
24 | | # undef rb_raise_static |
25 | | # undef rb_sys_fail_path |
26 | | # undef rb_syserr_fail_path |
27 | | #endif |
28 | | |
29 | | #define rb_raise_static(e, m) \ |
30 | | rb_raise_cstr_i((e), rb_str_new_static((m), rb_strlen_lit(m))) |
31 | | #ifdef RUBY_FUNCTION_NAME_STRING |
32 | 0 | # define rb_syserr_fail_path(err, path) rb_syserr_fail_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path)) |
33 | 0 | # define rb_syserr_new_path(err, path) rb_syserr_new_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path)) |
34 | | #else |
35 | | # define rb_syserr_fail_path(err, path) rb_syserr_fail_str((err), (path)) |
36 | | # define rb_syserr_new_path(err, path) rb_syserr_new_str((err), (path)) |
37 | | #endif |
38 | | |
39 | 0 | #define rb_sys_fail(mesg) \ |
40 | 0 | do { \ |
41 | 0 | int errno_to_fail = errno; \ |
42 | 0 | rb_syserr_fail(errno_to_fail, (mesg)); \ |
43 | 0 | } while (0) |
44 | | |
45 | 0 | #define rb_sys_fail_str(mesg) \ |
46 | 0 | do { \ |
47 | 0 | int errno_to_fail = errno; \ |
48 | 0 | rb_syserr_fail_str(errno_to_fail, (mesg)); \ |
49 | 0 | } while (0) |
50 | | |
51 | 0 | #define rb_sys_fail_path(path) \ |
52 | 0 | do { \ |
53 | 0 | int errno_to_fail = errno; \ |
54 | 0 | rb_syserr_fail_path(errno_to_fail, (path)); \ |
55 | 0 | } while (0) |
56 | | |
57 | 0 | #define rb_sys_fail_sprintf(...) \ |
58 | 0 | do { \ |
59 | 0 | int errno_to_fail = errno; \ |
60 | 0 | rb_syserr_fail_str(errno_to_fail, rb_sprintf("" __VA_ARGS__)); \ |
61 | 0 | } while (0) |
62 | | |
63 | | /* error.c */ |
64 | | extern long rb_backtrace_length_limit; |
65 | | extern VALUE rb_eEAGAIN; |
66 | | extern VALUE rb_eEWOULDBLOCK; |
67 | | extern VALUE rb_eEINPROGRESS; |
68 | | RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 3, 0) |
69 | | void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args); |
70 | | NORETURN(void rb_async_bug_errno(const char *,int)); |
71 | | const char *rb_builtin_type_name(int t); |
72 | | const char *rb_builtin_class_name(VALUE x); |
73 | | PRINTF_ARGS(void rb_warn_deprecated(const char *fmt, const char *suggest, ...), 1, 3); |
74 | | PRINTF_ARGS(void rb_warn_deprecated_to_remove(const char *removal, const char *fmt, const char *suggest, ...), 2, 4); |
75 | | PRINTF_ARGS(void rb_warn_reserved_name(const char *removal, const char *fmt, ...), 2, 3); |
76 | | #if RUBY_DEBUG |
77 | | # include "ruby/version.h" |
78 | | # define RUBY_VERSION_SINCE(major, minor) (RUBY_API_VERSION_CODE >= (major) * 10000 + (minor) * 100) |
79 | | # define RUBY_VERSION_BEFORE(major, minor) (RUBY_API_VERSION_CODE < (major) * 10000 + (minor) * 100) |
80 | | # if defined(RBIMPL_WARNING_PRAGMA0) |
81 | | # define RBIMPL_TODO0(x) RBIMPL_WARNING_PRAGMA0(message(x)) |
82 | | # elif RBIMPL_COMPILER_IS(MSVC) |
83 | | # define RBIMPL_TODO0(x) __pragma(message(x)) |
84 | | # endif |
85 | | |
86 | | # if RBIMPL_HAS_ATTRIBUTE(diagnose_if) || defined(__OPTIMIZE__) |
87 | | |
88 | | #define RUBY_VERSION_isdigit(c) ('0'<=(c)&&(c)<='9') |
89 | | // upto 99 |
90 | | #define RUBY_VERSION__number_len(v, ofs) \ |
91 | | (!RUBY_VERSION_isdigit((v)[ofs]) ? \ |
92 | | 0 : !RUBY_VERSION_isdigit((v)[(ofs) + 1]) ? 1 : 2) |
93 | | #define RUBY_VERSION__to_number(v, ofs) \ |
94 | | (!RUBY_VERSION_isdigit((v)[ofs]) ? \ |
95 | | 0 : !RUBY_VERSION_isdigit((v)[(ofs) + 1]) ? \ |
96 | | ((v)[ofs]-'0') : \ |
97 | | (((v)[ofs]-'0')*10+(v)[(ofs)+1]-'0')) |
98 | | |
99 | | #define RUBY_VERSION_CODE_FROM_MAJOR_MINOR_STRING(v) \ |
100 | | (RUBY_VERSION__to_number(v, 0) * 10000 + \ |
101 | | ((v)[RUBY_VERSION__number_len(v, 0)] == '.' ? \ |
102 | | RUBY_VERSION__to_number(v, RUBY_VERSION__number_len(v, 0)+1) * 100 : 0)) |
103 | | #define RUBY_VERSION_STRING_SINCE(v) (RUBY_API_VERSION_CODE >= RUBY_VERSION_CODE_FROM_MAJOR_MINOR_STRING(v)) |
104 | | #define RUBY_VERSION_STRING_BEFORE(v) (RUBY_API_VERSION_CODE < RUBY_VERSION_CODE_FROM_MAJOR_MINOR_STRING(v)) |
105 | | |
106 | | # if RBIMPL_HAS_ATTRIBUTE(diagnose_if) |
107 | | RBIMPL_ATTR_FORCEINLINE() |
108 | | static void |
109 | | rb_deprecated_method_to_be_removed(const char *removal) |
110 | | RBIMPL_ATTR_DIAGNOSE_IF(!RUBY_VERSION_isdigit(removal[0]), "malformed version number", "error") |
111 | | RBIMPL_ATTR_DIAGNOSE_IF(RUBY_VERSION_STRING_SINCE(removal), "deprecated method to be removed", "error") |
112 | | { |
113 | | } |
114 | | |
115 | | RBIMPL_ATTR_FORCEINLINE() |
116 | | static void |
117 | | rb_diagnose_reserved_name_at(const char *coming) |
118 | | RBIMPL_ATTR_DIAGNOSE_IF(!RUBY_VERSION_isdigit(coming[0]), "malformed version number", "error") |
119 | | RBIMPL_ATTR_DIAGNOSE_IF(RUBY_VERSION_STRING_SINCE(coming), "reserved name already in use", "error") |
120 | | { |
121 | | } |
122 | | # else |
123 | | RBIMPL_ATTR_ERROR(("deprecated")) |
124 | | void rb_deprecated_method_to_be_removed(const char *); |
125 | | # define rb_deprecated_method_to_be_removed(removal) \ |
126 | | (sizeof(char[1-2*(!RUBY_VERSION_isdigit(removal[0]) || RUBY_VERSION_STRING_SINCE(removal))])!=1 ? \ |
127 | | rb_deprecated_method_to_be_removed(removal) : \ |
128 | | RBIMPL_ASSERT_NOTHING) |
129 | | |
130 | | RBIMPL_ATTR_ERROR(("deprecated")) |
131 | | void rb_diagnose_reserved_name_at(const char *); |
132 | | # define rb_diagnose_reserved_name_at(coming) \ |
133 | | (sizeof(char[1-2*(!RUBY_VERSION_isdigit(coming[0]) || RUBY_VERSION_STRING_SINCE(coming))])!=1 ? \ |
134 | | rb_diagnose_reserved_name_at(coming) : \ |
135 | | RBIMPL_ASSERT_NOTHING) |
136 | | |
137 | | # endif |
138 | | # define rb_warn_deprecated_to_remove_at(removal, ...) \ |
139 | | (rb_deprecated_method_to_be_removed(#removal), \ |
140 | | rb_warn_deprecated_to_remove(#removal, __VA_ARGS__)) |
141 | | |
142 | | # define rb_warn_reserved_name_at(coming, ...) \ |
143 | | (rb_diagnose_reserved_name_at(#coming), \ |
144 | | rb_warn_reserved_name(#coming, __VA_ARGS__)) |
145 | | # endif |
146 | | #endif |
147 | | #ifndef rb_warn_deprecated_to_remove_at |
148 | | # define rb_warn_deprecated_to_remove_at(removal, ...) \ |
149 | | rb_warn_deprecated_to_remove(#removal, __VA_ARGS__) |
150 | | #endif |
151 | | #ifndef rb_warn_reserved_name_at |
152 | | # define rb_warn_reserved_name_at(removal, ...) \ |
153 | | rb_warn_reserved_name(#removal, __VA_ARGS__) |
154 | | #endif |
155 | | #ifndef RUBY_VERSION_SINCE |
156 | | # define RUBY_VERSION_SINCE(major, minor) 0 |
157 | | #endif |
158 | | #ifndef RUBY_VERSION_BEFORE |
159 | | # define RUBY_VERSION_BEFORE(major, minor) 0 |
160 | | #endif |
161 | | #ifndef RBIMPL_TODO0 |
162 | | # define RBIMPL_TODO0(x) |
163 | | #endif |
164 | | #define RBIMPL_TODO(message) RBIMPL_TODO0("TODO: " message) |
165 | | RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 6, 0) |
166 | | VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list); |
167 | | PRINTF_ARGS(void rb_enc_warn(rb_encoding *enc, const char *fmt, ...), 2, 3); |
168 | | PRINTF_ARGS(void rb_sys_enc_warning(rb_encoding *enc, const char *fmt, ...), 2, 3); |
169 | | PRINTF_ARGS(void rb_syserr_enc_warning(int err, rb_encoding *enc, const char *fmt, ...), 3, 4); |
170 | | PRINTF_ARGS(void rb_enc_compile_warning(rb_encoding *enc, const char *file, int line, const char *fmt, ...), 4, 5); |
171 | | PRINTF_ARGS(void rb_enc_compile_warn(rb_encoding *enc, const char *file, int line, const char *fmt, ...), 4, 5); |
172 | | rb_warning_category_t rb_warning_category_from_name(VALUE category); |
173 | | bool rb_warning_category_enabled_p(rb_warning_category_t category); |
174 | | VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method); |
175 | | VALUE rb_nomethod_err_new(VALUE mesg, VALUE recv, VALUE method, VALUE args, int priv); |
176 | | VALUE rb_key_err_new(VALUE mesg, VALUE recv, VALUE name); |
177 | | PRINTF_ARGS(VALUE rb_warning_string(const char *fmt, ...), 1, 2); |
178 | | RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 0) |
179 | | NORETURN(void rb_vraise(VALUE, const char *, va_list)); |
180 | | NORETURN(static inline void rb_raise_cstr(VALUE etype, const char *mesg)); |
181 | | NORETURN(static inline void rb_raise_cstr_i(VALUE etype, VALUE mesg)); |
182 | | NORETURN(static inline void rb_name_err_raise_str(VALUE mesg, VALUE recv, VALUE name)); |
183 | | NORETURN(static inline void rb_name_err_raise(const char *mesg, VALUE recv, VALUE name)); |
184 | | NORETURN(static inline void rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name)); |
185 | | static inline void Check_Type(VALUE v, enum ruby_value_type t); |
186 | | static inline bool rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type); |
187 | 0 | #define rb_typeddata_is_instance_of rb_typeddata_is_instance_of_inline |
188 | | void rb_bug_without_die(const char *fmt, ...); |
189 | | NORETURN(void rb_no_implicit_conversion(VALUE val, const char *tname)); |
190 | | NORETURN(void rb_cant_convert(VALUE val, const char *tname)); |
191 | | NORETURN(void rb_cant_convert_invalid_return(VALUE val, const char *tname, const char *method_name, VALUE ret)); |
192 | | |
193 | | RUBY_SYMBOL_EXPORT_BEGIN |
194 | | /* error.c (export) */ |
195 | | int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data); |
196 | | #ifdef RUBY_FUNCTION_NAME_STRING |
197 | | NORETURN(void rb_sys_fail_path_in(const char *func_name, VALUE path)); |
198 | | NORETURN(void rb_syserr_fail_path_in(const char *func_name, int err, VALUE path)); |
199 | | VALUE rb_syserr_new_path_in(const char *func_name, int n, VALUE path); |
200 | | #endif |
201 | | RUBY_SYMBOL_EXPORT_END |
202 | | |
203 | | /* vm.c */ |
204 | | void rb_free_warning(void); |
205 | | |
206 | | static inline void |
207 | | rb_raise_cstr_i(VALUE etype, VALUE mesg) |
208 | 0 | { |
209 | 0 | VALUE exc = rb_exc_new_str(etype, mesg); |
210 | 0 | rb_exc_raise(exc); |
211 | 0 | } Unexecuted instantiation: compar.c:rb_raise_cstr_i Unexecuted instantiation: complex.c:rb_raise_cstr_i Unexecuted instantiation: encoding.c:rb_raise_cstr_i Unexecuted instantiation: enumerator.c:rb_raise_cstr_i Unexecuted instantiation: error.c:rb_raise_cstr_i Unexecuted instantiation: eval.c:rb_raise_cstr_i Unexecuted instantiation: file.c:rb_raise_cstr_i Unexecuted instantiation: gc.c:rb_raise_cstr_i Unexecuted instantiation: hash.c:rb_raise_cstr_i Unexecuted instantiation: io.c:rb_raise_cstr_i Unexecuted instantiation: io_buffer.c:rb_raise_cstr_i Unexecuted instantiation: iseq.c:rb_raise_cstr_i Unexecuted instantiation: load.c:rb_raise_cstr_i Unexecuted instantiation: marshal.c:rb_raise_cstr_i Unexecuted instantiation: numeric.c:rb_raise_cstr_i Unexecuted instantiation: object.c:rb_raise_cstr_i Unexecuted instantiation: proc.c:rb_raise_cstr_i Unexecuted instantiation: process.c:rb_raise_cstr_i Unexecuted instantiation: ractor.c:rb_raise_cstr_i Unexecuted instantiation: range.c:rb_raise_cstr_i Unexecuted instantiation: rational.c:rb_raise_cstr_i Unexecuted instantiation: re.c:rb_raise_cstr_i Unexecuted instantiation: ruby.c:rb_raise_cstr_i Unexecuted instantiation: ruby_parser.c:rb_raise_cstr_i Unexecuted instantiation: set.c:rb_raise_cstr_i Unexecuted instantiation: shape.c:rb_raise_cstr_i Unexecuted instantiation: signal.c:rb_raise_cstr_i Unexecuted instantiation: sprintf.c:rb_raise_cstr_i Unexecuted instantiation: string.c:rb_raise_cstr_i Unexecuted instantiation: struct.c:rb_raise_cstr_i Unexecuted instantiation: symbol.c:rb_raise_cstr_i Unexecuted instantiation: thread.c:rb_raise_cstr_i Unexecuted instantiation: time.c:rb_raise_cstr_i Unexecuted instantiation: variable.c:rb_raise_cstr_i Unexecuted instantiation: vm.c:rb_raise_cstr_i Unexecuted instantiation: vm_backtrace.c:rb_raise_cstr_i Unexecuted instantiation: box.c:rb_raise_cstr_i Unexecuted instantiation: compile.c:rb_raise_cstr_i Unexecuted instantiation: cont.c:rb_raise_cstr_i Unexecuted instantiation: dir.c:rb_raise_cstr_i Unexecuted instantiation: parse.c:rb_raise_cstr_i |
212 | | |
213 | | static inline void |
214 | | rb_raise_cstr(VALUE etype, const char *mesg) |
215 | 0 | { |
216 | 0 | VALUE str = rb_str_new_cstr(mesg); |
217 | 0 | rb_raise_cstr_i(etype, str); |
218 | 0 | } Unexecuted instantiation: compar.c:rb_raise_cstr Unexecuted instantiation: complex.c:rb_raise_cstr Unexecuted instantiation: encoding.c:rb_raise_cstr Unexecuted instantiation: enumerator.c:rb_raise_cstr Unexecuted instantiation: error.c:rb_raise_cstr Unexecuted instantiation: eval.c:rb_raise_cstr Unexecuted instantiation: file.c:rb_raise_cstr Unexecuted instantiation: gc.c:rb_raise_cstr Unexecuted instantiation: hash.c:rb_raise_cstr Unexecuted instantiation: io.c:rb_raise_cstr Unexecuted instantiation: io_buffer.c:rb_raise_cstr Unexecuted instantiation: iseq.c:rb_raise_cstr Unexecuted instantiation: load.c:rb_raise_cstr Unexecuted instantiation: marshal.c:rb_raise_cstr Unexecuted instantiation: numeric.c:rb_raise_cstr Unexecuted instantiation: object.c:rb_raise_cstr Unexecuted instantiation: proc.c:rb_raise_cstr Unexecuted instantiation: process.c:rb_raise_cstr Unexecuted instantiation: ractor.c:rb_raise_cstr Unexecuted instantiation: range.c:rb_raise_cstr Unexecuted instantiation: rational.c:rb_raise_cstr Unexecuted instantiation: re.c:rb_raise_cstr Unexecuted instantiation: ruby.c:rb_raise_cstr Unexecuted instantiation: ruby_parser.c:rb_raise_cstr Unexecuted instantiation: set.c:rb_raise_cstr Unexecuted instantiation: shape.c:rb_raise_cstr Unexecuted instantiation: signal.c:rb_raise_cstr Unexecuted instantiation: sprintf.c:rb_raise_cstr Unexecuted instantiation: string.c:rb_raise_cstr Unexecuted instantiation: struct.c:rb_raise_cstr Unexecuted instantiation: symbol.c:rb_raise_cstr Unexecuted instantiation: thread.c:rb_raise_cstr Unexecuted instantiation: time.c:rb_raise_cstr Unexecuted instantiation: variable.c:rb_raise_cstr Unexecuted instantiation: vm.c:rb_raise_cstr Unexecuted instantiation: vm_backtrace.c:rb_raise_cstr Unexecuted instantiation: box.c:rb_raise_cstr Unexecuted instantiation: compile.c:rb_raise_cstr Unexecuted instantiation: cont.c:rb_raise_cstr Unexecuted instantiation: dir.c:rb_raise_cstr Unexecuted instantiation: parse.c:rb_raise_cstr |
219 | | |
220 | | static inline void |
221 | | rb_name_err_raise_str(VALUE mesg, VALUE recv, VALUE name) |
222 | 0 | { |
223 | 0 | VALUE exc = rb_name_err_new(mesg, recv, name); |
224 | 0 | rb_exc_raise(exc); |
225 | 0 | } Unexecuted instantiation: compar.c:rb_name_err_raise_str Unexecuted instantiation: complex.c:rb_name_err_raise_str Unexecuted instantiation: encoding.c:rb_name_err_raise_str Unexecuted instantiation: enumerator.c:rb_name_err_raise_str Unexecuted instantiation: error.c:rb_name_err_raise_str Unexecuted instantiation: eval.c:rb_name_err_raise_str Unexecuted instantiation: file.c:rb_name_err_raise_str Unexecuted instantiation: gc.c:rb_name_err_raise_str Unexecuted instantiation: hash.c:rb_name_err_raise_str Unexecuted instantiation: io.c:rb_name_err_raise_str Unexecuted instantiation: io_buffer.c:rb_name_err_raise_str Unexecuted instantiation: iseq.c:rb_name_err_raise_str Unexecuted instantiation: load.c:rb_name_err_raise_str Unexecuted instantiation: marshal.c:rb_name_err_raise_str Unexecuted instantiation: numeric.c:rb_name_err_raise_str Unexecuted instantiation: object.c:rb_name_err_raise_str Unexecuted instantiation: proc.c:rb_name_err_raise_str Unexecuted instantiation: process.c:rb_name_err_raise_str Unexecuted instantiation: ractor.c:rb_name_err_raise_str Unexecuted instantiation: range.c:rb_name_err_raise_str Unexecuted instantiation: rational.c:rb_name_err_raise_str Unexecuted instantiation: re.c:rb_name_err_raise_str Unexecuted instantiation: ruby.c:rb_name_err_raise_str Unexecuted instantiation: ruby_parser.c:rb_name_err_raise_str Unexecuted instantiation: set.c:rb_name_err_raise_str Unexecuted instantiation: shape.c:rb_name_err_raise_str Unexecuted instantiation: signal.c:rb_name_err_raise_str Unexecuted instantiation: sprintf.c:rb_name_err_raise_str Unexecuted instantiation: string.c:rb_name_err_raise_str Unexecuted instantiation: struct.c:rb_name_err_raise_str Unexecuted instantiation: symbol.c:rb_name_err_raise_str Unexecuted instantiation: thread.c:rb_name_err_raise_str Unexecuted instantiation: time.c:rb_name_err_raise_str Unexecuted instantiation: variable.c:rb_name_err_raise_str Unexecuted instantiation: vm.c:rb_name_err_raise_str Unexecuted instantiation: vm_backtrace.c:rb_name_err_raise_str Unexecuted instantiation: box.c:rb_name_err_raise_str Unexecuted instantiation: compile.c:rb_name_err_raise_str Unexecuted instantiation: cont.c:rb_name_err_raise_str Unexecuted instantiation: dir.c:rb_name_err_raise_str Unexecuted instantiation: parse.c:rb_name_err_raise_str |
226 | | |
227 | | static inline void |
228 | | rb_name_err_raise(const char *mesg, VALUE recv, VALUE name) |
229 | 0 | { |
230 | 0 | VALUE str = rb_fstring_cstr(mesg); |
231 | 0 | rb_name_err_raise_str(str, recv, name); |
232 | 0 | } Unexecuted instantiation: compar.c:rb_name_err_raise Unexecuted instantiation: complex.c:rb_name_err_raise Unexecuted instantiation: encoding.c:rb_name_err_raise Unexecuted instantiation: enumerator.c:rb_name_err_raise Unexecuted instantiation: error.c:rb_name_err_raise Unexecuted instantiation: eval.c:rb_name_err_raise Unexecuted instantiation: file.c:rb_name_err_raise Unexecuted instantiation: gc.c:rb_name_err_raise Unexecuted instantiation: hash.c:rb_name_err_raise Unexecuted instantiation: io.c:rb_name_err_raise Unexecuted instantiation: io_buffer.c:rb_name_err_raise Unexecuted instantiation: iseq.c:rb_name_err_raise Unexecuted instantiation: load.c:rb_name_err_raise Unexecuted instantiation: marshal.c:rb_name_err_raise Unexecuted instantiation: numeric.c:rb_name_err_raise Unexecuted instantiation: object.c:rb_name_err_raise Unexecuted instantiation: proc.c:rb_name_err_raise Unexecuted instantiation: process.c:rb_name_err_raise Unexecuted instantiation: ractor.c:rb_name_err_raise Unexecuted instantiation: range.c:rb_name_err_raise Unexecuted instantiation: rational.c:rb_name_err_raise Unexecuted instantiation: re.c:rb_name_err_raise Unexecuted instantiation: ruby.c:rb_name_err_raise Unexecuted instantiation: ruby_parser.c:rb_name_err_raise Unexecuted instantiation: set.c:rb_name_err_raise Unexecuted instantiation: shape.c:rb_name_err_raise Unexecuted instantiation: signal.c:rb_name_err_raise Unexecuted instantiation: sprintf.c:rb_name_err_raise Unexecuted instantiation: string.c:rb_name_err_raise Unexecuted instantiation: struct.c:rb_name_err_raise Unexecuted instantiation: symbol.c:rb_name_err_raise Unexecuted instantiation: thread.c:rb_name_err_raise Unexecuted instantiation: time.c:rb_name_err_raise Unexecuted instantiation: variable.c:rb_name_err_raise Unexecuted instantiation: vm.c:rb_name_err_raise Unexecuted instantiation: vm_backtrace.c:rb_name_err_raise Unexecuted instantiation: box.c:rb_name_err_raise Unexecuted instantiation: compile.c:rb_name_err_raise Unexecuted instantiation: cont.c:rb_name_err_raise Unexecuted instantiation: dir.c:rb_name_err_raise Unexecuted instantiation: parse.c:rb_name_err_raise |
233 | | |
234 | | static inline void |
235 | | rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name) |
236 | 466 | { |
237 | 466 | VALUE exc = rb_key_err_new(mesg, recv, name); |
238 | 466 | rb_exc_raise(exc); |
239 | 466 | } Unexecuted instantiation: compar.c:rb_key_err_raise Unexecuted instantiation: complex.c:rb_key_err_raise Unexecuted instantiation: encoding.c:rb_key_err_raise Unexecuted instantiation: enumerator.c:rb_key_err_raise Unexecuted instantiation: error.c:rb_key_err_raise Unexecuted instantiation: eval.c:rb_key_err_raise Unexecuted instantiation: file.c:rb_key_err_raise Unexecuted instantiation: gc.c:rb_key_err_raise Line | Count | Source | 236 | 466 | { | 237 | 466 | VALUE exc = rb_key_err_new(mesg, recv, name); | 238 | 466 | rb_exc_raise(exc); | 239 | 466 | } |
Unexecuted instantiation: io.c:rb_key_err_raise Unexecuted instantiation: io_buffer.c:rb_key_err_raise Unexecuted instantiation: iseq.c:rb_key_err_raise Unexecuted instantiation: load.c:rb_key_err_raise Unexecuted instantiation: marshal.c:rb_key_err_raise Unexecuted instantiation: numeric.c:rb_key_err_raise Unexecuted instantiation: object.c:rb_key_err_raise Unexecuted instantiation: proc.c:rb_key_err_raise Unexecuted instantiation: process.c:rb_key_err_raise Unexecuted instantiation: ractor.c:rb_key_err_raise Unexecuted instantiation: range.c:rb_key_err_raise Unexecuted instantiation: rational.c:rb_key_err_raise Unexecuted instantiation: re.c:rb_key_err_raise Unexecuted instantiation: ruby.c:rb_key_err_raise Unexecuted instantiation: ruby_parser.c:rb_key_err_raise Unexecuted instantiation: set.c:rb_key_err_raise Unexecuted instantiation: shape.c:rb_key_err_raise Unexecuted instantiation: signal.c:rb_key_err_raise Unexecuted instantiation: sprintf.c:rb_key_err_raise Unexecuted instantiation: string.c:rb_key_err_raise Unexecuted instantiation: struct.c:rb_key_err_raise Unexecuted instantiation: symbol.c:rb_key_err_raise Unexecuted instantiation: thread.c:rb_key_err_raise Unexecuted instantiation: time.c:rb_key_err_raise Unexecuted instantiation: variable.c:rb_key_err_raise Unexecuted instantiation: vm.c:rb_key_err_raise Unexecuted instantiation: vm_backtrace.c:rb_key_err_raise Unexecuted instantiation: box.c:rb_key_err_raise Unexecuted instantiation: compile.c:rb_key_err_raise Unexecuted instantiation: cont.c:rb_key_err_raise Unexecuted instantiation: dir.c:rb_key_err_raise Unexecuted instantiation: parse.c:rb_key_err_raise |
240 | | |
241 | | RBIMPL_ATTR_NONNULL((2)) |
242 | | static inline bool |
243 | | rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type) |
244 | 0 | { |
245 | 0 | return rbimpl_obj_typeddata_p(obj) && (RTYPEDDATA_TYPE(obj) == data_type); |
246 | 0 | } Unexecuted instantiation: compar.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: complex.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: encoding.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: enumerator.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: error.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: eval.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: file.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: gc.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: hash.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: io.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: io_buffer.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: iseq.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: load.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: marshal.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: numeric.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: object.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: proc.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: process.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: ractor.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: range.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: rational.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: re.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: ruby.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: ruby_parser.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: set.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: shape.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: signal.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: sprintf.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: string.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: struct.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: symbol.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: thread.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: time.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: variable.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: vm.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: vm_backtrace.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: box.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: compile.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: cont.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: dir.c:rb_typeddata_is_instance_of_inline Unexecuted instantiation: parse.c:rb_typeddata_is_instance_of_inline |
247 | | |
248 | | typedef enum { |
249 | | rb_stack_overflow_prevention = 0, // VM stack overflow or about to machine stack overflow |
250 | | rb_stack_overflow_signal = 1, // machine stack overflow but may be recoverable |
251 | | rb_stack_overflow_fatal = 2, // fatal machine stack overflow |
252 | | } ruby_stack_overflow_critical_level; |
253 | | NORETURN(void rb_ec_stack_overflow(struct rb_execution_context_struct *ec, ruby_stack_overflow_critical_level crit)); |
254 | | |
255 | | #endif /* INTERNAL_ERROR_H */ |