Module: Gracefully::NestedError

Included in:
Error
Defined in:
lib/gracefully/error.rb

Overview

Thanks to [nested](github.com/skorks/nesty) for the original code

Instance Method Summary collapse

Instance Method Details

#initialize(message, args) ⇒ Object



4
5
6
7
# File 'lib/gracefully/error.rb', line 4

def initialize(message, args)
  @nested = args[:nested]
  super(message)
end

#set_backtrace(backtrace) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/gracefully/error.rb', line 9

def set_backtrace(backtrace)
  @raw_backtrace = backtrace
  if nested
    backtrace = include_nested_raw_backtrace_in backtrace
  end
  super(backtrace)
end