Module: MessageDriver::Nesty::NestedError
- Included in:
- WrappedError
- Defined in:
- lib/vendor/nesty/nested_error.rb
Instance Attribute Summary collapse
-
#nested ⇒ Object
readonly
Returns the value of attribute nested.
-
#raw_backtrace ⇒ Object
readonly
Returns the value of attribute raw_backtrace.
Instance Method Summary collapse
Instance Attribute Details
#nested ⇒ Object (readonly)
Returns the value of attribute nested.
4 5 6 |
# File 'lib/vendor/nesty/nested_error.rb', line 4 def nested @nested end |
#raw_backtrace ⇒ Object (readonly)
Returns the value of attribute raw_backtrace.
4 5 6 |
# File 'lib/vendor/nesty/nested_error.rb', line 4 def raw_backtrace @raw_backtrace end |
Instance Method Details
#initialize(msg = nil, nested) ⇒ Object
6 7 8 9 |
# File 'lib/vendor/nesty/nested_error.rb', line 6 def initialize(msg = nil, nested) super(msg) @nested = nested end |
#set_backtrace(backtrace) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/vendor/nesty/nested_error.rb', line 11 def set_backtrace(backtrace) @raw_backtrace = backtrace if nested backtrace = backtrace - nested_raw_backtrace backtrace += ["#{nested.backtrace.first}: #{nested.} (#{nested.class.name})"] backtrace += nested.backtrace[1..-1] || [] end super(backtrace) end |