Exception: Lh::Exceptions::BaseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/lh/exceptions/base_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(msg_or_exc = nil) ⇒ BaseError



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/lh/exceptions/base_error.rb', line 6

def initialize(msg_or_exc = nil)
  if msg_or_exc.nil?
    super
  elsif msg_or_exc.is_a?(String)
    super(msg_or_exc)
  else
    @nested = msg_or_exc
    super(msg_or_exc.message)
    set_backtrace(@nested.backtrace)
  end
end