Sha256: 625b4713e5c3613aaf7eb0f80e005a811f2e4aa4ce31310d41ab2ebaf3d2cfa5
Contents?: true
Size: 695 Bytes
Versions: 12
Compression:
Stored size: 695 Bytes
Contents
module MessageDriver module Nesty module NestedError attr_reader :nested, :raw_backtrace def initialize(msg = nil, nested) super(msg) @nested = nested end 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 private def nested_raw_backtrace nested.respond_to?(:raw_backtrace) ? nested.raw_backtrace : nested.backtrace end end end end
Version data entries
12 entries across 12 versions & 1 rubygems