Exception
The ancestor class of all exceptions.
Refer to Built-in Exception Classes for information on its subclasses.
Superclass
Object
Class Method
Exception.new([error_message])
Creates and returns a new exception object. A string indicating an error message can be supplied as an argument. This message will become the value of the message attribute (below) and will be displayed by the default exception handler.
Methods
exception([error_message])
Returns self when no argument is specified. Otherwise, creates a copy of itself with the message attribute as error_message and returns it.
raise actually calls the Exception object's exception method.
backtrace
Returns backtrace information as a String array in the follow formats:
"#{sourcefile}:#{sourceline}:in '#{method}'"
(within methods)
"#{sourcefile}:#{sourceline}"
(at the top level)
message
Returns the error message string.
Last updated