Class: NativeException

Inherits:
Object
  • Object
show all
Defined in:
lib/pacer/support/native_exception.rb

Instance Method Summary collapse

Instance Method Details

#root_causeObject



14
15
16
17
18
19
20
21
# File 'lib/pacer/support/native_exception.rb', line 14

def root_cause
  rc = e = self
  while e and e.respond_to? :cause
    rc = e
    e = e.cause
  end
  rc
end

#unravelObject



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/pacer/support/native_exception.rb', line 2

def unravel
  e = self
  while e and e.respond_to? :cause
    puts '--------------------'
    puts e.class.to_s
    puts e.message
    pp e.backtrace.to_a
    e = e.cause
  end
  puts '======================'
end