Descendents of class Exception are used to communicate between
raise methods and rescue statements in begin/end
blocks. Exception objects carry information about the
exception—its type (the exception’s class name), an optional
descriptive string, and optional traceback information. Programs may
subclass Exception to add additional information.
| Classes |
| message |
Descendents of class Exception are used to communicate between
raise methods and rescue statements in begin/end
blocks. Exception objects carry information about the
exception—its type (the exception’s class name), an optional
descriptive string, and optional traceback information. Programs may
subclass Exception to add additional information.
|
| Public Methods |
| name |
Return the name associated with this NameError exception.
|
| new |
Construct a new NameError exception. If given the name parameter
may subsequently be examined using the NameError.name method.
|
| to_s |
Produce a nicely-formated string representing the NameError.
|
<code/>and<pre/>for code samples.