Exception: DepShield::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/dep_shield.rb

Instance Method Summary collapse

Constructor Details

#initialize(message, callstack) ⇒ Error

Returns a new instance of Error.



12
13
14
15
16
17
18
19
20
21
# File 'lib/dep_shield.rb', line 12

def initialize(message, callstack)
  super(message)

  case callstack
  when Array
    set_backtrace callstack.map(&:to_s)
  when Thread::Backtrace::Location, String
    set_backtrace [callstack.to_s]
  end
end