Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
Macros | Functions
error.h File Reference

Public APIs related to rb_eException. More...

#include "ruby/internal/dllexport.h"
#include "ruby/internal/value.h"
#include "ruby/internal/fl_type.h"
#include "ruby/backward/2/assume.h"
#include "ruby/backward/2/attributes.h"

Go to the source code of this file.

Macros

#define UNLIMITED_ARGUMENTS   (-1)
 
#define rb_exc_new2   rb_exc_new_cstr
 
#define rb_exc_new3   rb_exc_new_str
 
#define rb_check_trusted   rb_check_trusted
 
#define rb_check_trusted_inline   rb_check_trusted
 
#define rb_check_arity   rb_check_arity
 
#define rb_check_frozen_internal(obj)
 
#define rb_check_frozen   rb_check_frozen_inline
 

Functions

VALUE rb_exc_new (VALUE, const char *, long)
 
VALUE rb_exc_new_cstr (VALUE, const char *)
 
VALUE rb_exc_new_str (VALUE, VALUE)
 
void rb_loaderror (const char *,...)
 
void rb_loaderror_with_path (VALUE path, const char *,...)
 
void rb_name_error (ID, const char *,...)
 
void rb_name_error_str (VALUE, const char *,...)
 
void rb_frozen_error_raise (VALUE, const char *,...)
 
void rb_invalid_str (const char *, const char *)
 
void rb_error_frozen (const char *)
 
void rb_error_frozen_object (VALUE)
 
void rb_error_untrusted (VALUE)
 
void rb_check_frozen (VALUE)
 
void rb_check_trusted (VALUE)
 
void rb_check_copyable (VALUE obj, VALUE orig)
 
void rb_error_arity (int, int, int)
 

Detailed Description

Public APIs related to rb_eException.

Author
Ruby developers ruby-.nosp@m.core.nosp@m.@ruby.nosp@m.-lan.nosp@m.g.org
Warning
Symbols prefixed with either RBIMPL or rbimpl are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will.
Note
To ruby-core: remember that this header can be possibly recursively included from extension libraries written in C++. Do not expect for instance __VA_ARGS__ is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98.

Definition in file error.h.

Macro Definition Documentation

◆ rb_check_arity

#define rb_check_arity   rb_check_arity

Definition at line 34 of file error.h.

◆ rb_check_frozen

#define rb_check_frozen   rb_check_frozen_inline

Definition at line 72 of file error.h.

◆ rb_check_frozen_internal

#define rb_check_frozen_internal (   obj)
Value:
do { \
VALUE frozen_obj = (obj); \
if (RB_UNLIKELY(RB_OBJ_FROZEN(frozen_obj))) { \
rb_error_frozen_object(frozen_obj); \
} \
} while (0)
#define RB_UNLIKELY(x)
Definition: assume.h:40
unsigned long VALUE
Definition: value.h:38

Definition at line 58 of file error.h.

◆ rb_check_trusted

#define rb_check_trusted   rb_check_trusted

Definition at line 32 of file error.h.

◆ rb_check_trusted_inline

#define rb_check_trusted_inline   rb_check_trusted

Definition at line 33 of file error.h.

◆ rb_exc_new2

#define rb_exc_new2   rb_exc_new_cstr

Definition at line 30 of file error.h.

◆ rb_exc_new3

#define rb_exc_new3   rb_exc_new_str

Definition at line 31 of file error.h.

◆ UNLIMITED_ARGUMENTS

#define UNLIMITED_ARGUMENTS   (-1)

Definition at line 29 of file error.h.

Function Documentation

◆ rb_error_arity()

void rb_error_arity ( int  argc,
int  min,
int  max 
)

Definition at line 442 of file vm_insnhelper.c.

References argc, max, and rb_exc_raise().