Exception: NameError

Inherits:
StandardError show all
Defined in:
error.c

Direct Known Subclasses

NoMethodError

Defined Under Namespace

Classes: message

Instance Method Summary collapse

Methods inherited from Exception

#backtrace, #exception, exception, #inspect, #message, #set_backtrace, #to_str

Constructor Details

#new(msg[, name]) ⇒ Object

Construct a new NameError exception. If given the name parameter may subsequently be examined using the NameError.name method.



626
627
628
# File 'error.c', line 626

static VALUE
name_err_initialize(argc, argv, self)
int argc;

Instance Method Details

#nameString?

Return the name associated with this NameError exception.

Returns:



647
648
649
# File 'error.c', line 647

static VALUE
name_err_name(self)
VALUE self;

#to_sString

Produce a nicely-formated string representing the NameError.

Returns:



661
662
663
# File 'error.c', line 661

static VALUE
name_err_to_s(exc)
VALUE exc;