module Nesty::NestedError
Attributes
Public Class Methods
Source
# File lib/nesty/nested_error.rb, line 5 def initialize(msg = nil, nested = $!) super(msg) @nested = nested end
Calls superclass method
Public Instance Methods
Source
# File lib/nesty/nested_error.rb, line 10 def set_backtrace(backtrace) @raw_backtrace = backtrace if nested backtrace = backtrace - nested_raw_backtrace backtrace += ["#{nested.backtrace.first}: #{nested.message} (#{nested.class.name})"] backtrace += nested.backtrace[1..-1] || [] end super(backtrace) end
Calls superclass method
Private Instance Methods
Source
# File lib/nesty/nested_error.rb, line 22 def nested_raw_backtrace nested.respond_to?(:raw_backtrace) ? nested.raw_backtrace : nested.backtrace end