Ruby
3.4.0dev (2024-12-06 revision 892c46283a5ea4179500d951c9d4866c0051f27b)
|
Declares rb_raise(). More...
#include "ruby/internal/attr/cold.h"
#include "ruby/internal/attr/format.h"
#include "ruby/internal/attr/noreturn.h"
#include "ruby/internal/attr/nonnull.h"
#include "ruby/internal/dllexport.h"
#include "ruby/internal/value.h"
Go to the source code of this file.
Macros | |
#define | ruby_verbose (*rb_ruby_verbose_ptr()) |
This variable controls whether the interpreter is in debug mode. More... | |
#define | ruby_debug (*rb_ruby_debug_ptr()) |
This variable controls whether the interpreter is in debug mode. More... | |
Enumerations | |
enum | rb_warning_category_t { RB_WARN_CATEGORY_NONE , RB_WARN_CATEGORY_DEPRECATED , RB_WARN_CATEGORY_EXPERIMENTAL , RB_WARN_CATEGORY_PERFORMANCE , RB_WARN_CATEGORY_STRICT_UNUSED_BLOCK , RB_WARN_CATEGORY_DEFAULT_BITS , RB_WARN_CATEGORY_ALL_BITS } |
Warning categories. More... | |
enum | rb_io_wait_readwrite { RB_IO_WAIT_READABLE , RB_IO_WAIT_WRITABLE } |
for rb_readwrite_sys_fail first argument More... | |
Functions | |
VALUE | rb_errinfo (void) |
This is the same as $! in Ruby. More... | |
void | rb_set_errinfo (VALUE err) |
Sets the current exception ($! ) to the given value. More... | |
void | rb_raise (VALUE exc, const char *fmt,...) |
Exception entry point. More... | |
void | rb_fatal (const char *fmt,...) |
Raises the unsung "fatal" exception. More... | |
void | rb_bug (const char *fmt,...) |
Interpreter panic switch. More... | |
void | rb_bug_errno (const char *msg, int err) |
This is a wrapper of rb_bug() which automatically constructs appropriate message from the passed errno. More... | |
void | rb_sys_fail (const char *msg) |
Converts a C errno into a Ruby exception, then raises it. More... | |
void | rb_sys_fail_str (VALUE msg) |
Identical to rb_sys_fail(), except it takes the message in Ruby's String instead of C's. More... | |
void | rb_mod_sys_fail (VALUE mod, const char *msg) |
Identical to rb_sys_fail(), except it takes additional module to extend the exception object before raising. More... | |
void | rb_mod_sys_fail_str (VALUE mod, VALUE msg) |
Identical to rb_mod_sys_fail(), except it takes the message in Ruby's String instead of C's. More... | |
void | rb_readwrite_sys_fail (enum rb_io_wait_readwrite waiting, const char *msg) |
Raises appropriate exception using the parameters. More... | |
void | rb_iter_break (void) |
Breaks from a block. More... | |
void | rb_iter_break_value (VALUE val) |
Identical to rb_iter_break(), except it additionally takes the "value" of this breakage. More... | |
void | rb_exit (int status) |
Terminates the current execution context. More... | |
void | rb_notimplement (void) |
VALUE | rb_syserr_new (int err, const char *msg) |
Creates an exception object that represents the given C errno. More... | |
VALUE | rb_syserr_new_str (int n, VALUE arg) |
Identical to rb_syserr_new(), except it takes the message in Ruby's String instead of C's. More... | |
void | rb_syserr_fail (int err, const char *msg) |
Raises appropriate exception that represents a C errno. More... | |
void | rb_syserr_fail_str (int err, VALUE msg) |
Identical to rb_syserr_fail(), except it takes the message in Ruby's String instead of C's. More... | |
void | rb_mod_syserr_fail (VALUE mod, int err, const char *msg) |
Identical to rb_mod_sys_fail(), except it does not depend on C global variable errno. More... | |
void | rb_mod_syserr_fail_str (VALUE mod, int err, VALUE msg) |
Identical to rb_mod_syserr_fail(), except it takes the message in Ruby's String instead of C's. More... | |
void | rb_readwrite_syserr_fail (enum rb_io_wait_readwrite waiting, int err, const char *msg) |
Identical to rb_readwrite_sys_fail(), except it does not depend on C global variable errno. More... | |
void | rb_unexpected_type (VALUE self, int t) |
Fails with the given object's type incompatibility to the type. More... | |
void | rb_warning (const char *fmt,...) |
Issues a warning. More... | |
void | rb_category_warning (rb_warning_category_t cat, const char *fmt,...) |
Identical to rb_warning(), except it takes additional "category" parameter. More... | |
void | rb_compile_warning (const char *file, int line, const char *fmt,...) |
Issues a compile-time warning that happens at __file__:__line__ . More... | |
void | rb_sys_warning (const char *fmt,...) |
Identical to rb_sys_fail(), except it does not raise an exception to render a warning instead. More... | |
void | rb_warn (const char *fmt,...) |
Identical to rb_warning(), except it reports unless $VERBOSE is nil. More... | |
void | rb_category_warn (rb_warning_category_t cat, const char *fmt,...) |
Identical to rb_category_warning(), except it reports unless $VERBOSE is nil. More... | |
void | rb_compile_warn (const char *file, int line, const char *fmt,...) |
Identical to rb_compile_warning(), except it reports unless $VERBOSE is nil. More... | |
void | rb_category_compile_warn (rb_warning_category_t cat, const char *file, int line, const char *fmt,...) |
Identical to rb_compile_warn(), except it also accepts category. More... | |
Declares rb_raise().
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. __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.