End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Exception.new
Exception.new(msg = nil) → exception
Exception.exception(msg = nil) → exception
error.c
View on GitHub ↗
static VALUE
exc_initialize(int argc, VALUE *argv, VALUE exc)
{
VALUE arg;
arg = (!rb_check_arity(argc, 0, 1) ? Qnil : argv[0]);
return exc_init(exc, arg);
}
Construct a new Exception object, optionally passing in a message.