123456789_123456789_123456789_123456789_123456789_

Class: DEBUGGER__::ExceptionTracer

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Tracer
Instance Chain:
Inherits: DEBUGGER__::Tracer
Defined in: lib/debug/tracer.rb

Class Method Summary

Tracer - Inherited

Instance Attribute Summary

Tracer - Inherited

Instance Method Summary

Tracer - Inherited

Color - Included

#color_pp

See additional method definition at line 50.

#colored_inspect,
#colorize

See additional method definition at line 36.

#colorize_blue,
#colorize_code

See additional method definition at line 79.

#colorize_cyan, #colorize_dim, #colorize_magenta,
#irb_colorize

See additional method definition at line 27.

#with_inspection_error_guard

SkipPathHelper - Included

Constructor Details

This class inherits a constructor from DEBUGGER__::Tracer

Instance Method Details

#setup

[ GitHub ]

  
# File 'lib/debug/tracer.rb', line 151

def setup
  @tracer = TracePoint.new(:raise) do |tp|
    next if skip?(tp)

    exc = tp.raised_exception

    out tp, " #{colorize_magenta(exc.inspect)}"
  rescue Exception => e
    p e
  end
end

#skip_with_pattern?(tp) ⇒ Boolean

[ GitHub ]

  
# File 'lib/debug/tracer.rb', line 163

def skip_with_pattern?(tp)
  super && !tp.raised_exception.inspect.match?(@pattern)
end