exc/exception_extensions |
module ExceptionExtension |
Public Methods |
When Ruby code calls raise(), the interpreter calls the exception() method on the object passed to raise. If that object is a Class, then exception() will return a new instance of an exception object; if that object is an Object and not a Class, then exception() will generally return self.
Private Methods |
module ExceptionData |
Example:
begin
raise "Foo!"
rescue RuntimeError
p $!.message
$!.extend(ExceptionData)
$!.data = 42
raise $!, $!.message, $!.backtrace
end
Public Methods |
Mixins |
| ExceptionExtension |
|---|