1#ifndef INTERNAL_ERROR_H
2#define INTERNAL_ERROR_H
25# undef rb_raise_static
26# undef rb_sys_fail_path
27# undef rb_syserr_fail_path
30#define rb_raise_static(e, m) \
31 rb_raise_cstr_i((e), rb_str_new_static((m), rb_strlen_lit(m)))
32#ifdef RUBY_FUNCTION_NAME_STRING
33# define rb_sys_fail_path(path) rb_sys_fail_path_in(RUBY_FUNCTION_NAME_STRING, path)
34# define rb_syserr_fail_path(err, path) rb_syserr_fail_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
35# define rb_syserr_new_path(err, path) rb_syserr_new_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
37# define rb_sys_fail_path(path) rb_sys_fail_str(path)
38# define rb_syserr_fail_path(err, path) rb_syserr_fail_str((err), (path))
39# define rb_syserr_new_path(err, path) rb_syserr_new_str((err), (path))
64NORETURN(
static inline void rb_raise_cstr(
VALUE etype,
const char *mesg));
70static inline bool rb_typeddata_is_instance_of_inline(
VALUE obj,
const rb_data_type_t *data_type);
71#define rb_typeddata_is_instance_of rb_typeddata_is_instance_of_inline
73RUBY_SYMBOL_EXPORT_BEGIN
76#ifdef RUBY_FUNCTION_NAME_STRING
77NORETURN(
void rb_sys_fail_path_in(
const char *func_name,
VALUE path));
78NORETURN(
void rb_syserr_fail_path_in(
const char *func_name,
int err,
VALUE path));
79VALUE rb_syserr_new_path_in(
const char *func_name,
int n,
VALUE path);
91rb_raise_cstr(
VALUE etype,
const char *mesg)
94 rb_raise_cstr_i(etype,
str);
108 rb_name_err_raise_str(
str, recv,
name);
121 return RB_TYPE_P(obj,
T_DATA) && RTYPEDDATA_P(obj) && (RTYPEDDATA_TYPE(obj) == data_type);
#define PRINTF_ARGS(decl, string_index, first_to_check)
char str[HTML_ESCAPE_MAX_LEN+1]
int rb_bug_reporter_add(void(*func)(FILE *, void *), void *data)
VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding *, const char *, va_list)
void rb_warn_deprecated_to_remove(const char *fmt, const char *removal,...)
void rb_enc_warn(rb_encoding *enc, const char *fmt,...)
void rb_sys_enc_warning(rb_encoding *enc, const char *fmt,...)
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
void rb_syserr_enc_warning(int err, rb_encoding *enc, const char *fmt,...)
VALUE rb_nomethod_err_new(VALUE mesg, VALUE recv, VALUE method, VALUE args, int priv)
const char * rb_builtin_type_name(int t)
VALUE rb_warning_string(const char *fmt,...)
void rb_vraise(VALUE, const char *, va_list)
const char * rb_builtin_class_name(VALUE x)
void rb_warn_deprecated(const char *fmt, const char *suggest,...)
VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method)
rb_warning_category_t rb_warning_category_from_name(VALUE category)
VALUE rb_exc_new_str(VALUE etype, VALUE str)
long rb_backtrace_length_limit
void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args)
void rb_async_bug_errno(const char *, int)
bool rb_warning_category_enabled_p(rb_warning_category_t category)
VALUE rb_key_err_new(VALUE mesg, VALUE recv, VALUE name)
Thin wrapper to ruby/config.h.
#define rb_str_new_cstr(str)
Internal header for String.
#define rb_fstring_cstr(...)
ruby_value_type
C-level type of an object.