==

exc == obj â true or false Instance Public methods EqualityâIf obj is not an Exception, returns false. Otherwise, returns true if exc and obj share same class, messages, and backtrace.

as_json

as_json(*) Instance Public methods Returns a hash, that will be turned into a JSON object and represent this object.

backtrace

exception.backtrace â array Instance Public methods Returns any backtrace associated with the exception. The backtrace is an array of strings, each containing either âfilename:lineNo: in `method''' or âfilename:lineNo.'' def a raise "boom" end def b a() end begin b() rescue => detail print detail.backtrace.join("\n") end produces: prog.rb:2:in `a' prog.rb:6:in `b' prog.rb:10

exception 2

exc.exception(string) â an_exception or exc Instance Public methods With no argument, or if the argument is the same as the receiver, return the receiver. Otherwise, create a new exception object of the same class as the receiver, but with a message equal to string.to_str.

inspect

exception.inspect â string Instance Public methods Return this exception's class name and message

message

exception.message â string Instance Public methods Returns the result of invoking exception.to_s. Normally this returns the exception's message or name. By supplying a to_str method, exceptions are agreeing to be used where Strings are expected.

set_backtrace

exc.set_backtrace(backtrace) â array Instance Public methods Sets the backtrace information associated with exc. The backtrace must be an array of String objects or a single String in the format described in #backtrace.

to_json

to_json(*args) Instance Public methods Stores class name (Exception) with message m and backtrace array b as JSON string

to_s

exception.to_s â string Instance Public methods Returns exception's message (or the name of the exception if no message is set).

Fail

Fail(klass = E2MM, err = nil, *rest) Class Public methods Alias for: Raise