Module: Wildsight::Tools

Included in:
Agent::Agent
Defined in:
lib/wildsight/agent/tools.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extract_exception(exception) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/wildsight/agent/tools.rb', line 8

def self.extract_exception(exception)
  result = {
      :message => exception.message,
      :backtrace => exception.backtrace,
      :name => exception.class.name
  }
  if exception.cause
    result[:cause] = extract_exception(exception.cause)
  end
  return result
end

Instance Method Details

#extract_exception(exception) ⇒ Object



4
5
6
# File 'lib/wildsight/agent/tools.rb', line 4

def extract_exception(exception)
  Tools.extract_exception(exception)
end