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.



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

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

Instance Method Details

#nameString?

Return the name associated with this NameError exception.

Returns:



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

static VALUE
name_err_name(self)
VALUE self;

#to_sString

Produce a nicely-formated string representing the NameError.

Returns:



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

static VALUE
name_err_to_s(exc)
VALUE exc;