Class: DEBUGGER__::ExceptionTracer
Instance Attribute Summary
Attributes inherited from Tracer
Instance Method Summary collapse
Methods inherited from Tracer
#colorize, #description, #disable, #enable, #enabled?, #header, #initialize, #minfo, #out, #skip?, #to_s
Methods included from Color
#color_pp, #colored_inspect, #colorize, #colorize_blue, #colorize_code, #colorize_cyan, #colorize_dim, #colorize_magenta, #irb_colorize, #with_inspection_error_guard
Methods included from SkipPathHelper
#skip_config_skip_path?, #skip_internal_path?, #skip_location?, #skip_path?
Constructor Details
This class inherits a constructor from DEBUGGER__::Tracer
Instance Method Details
#setup ⇒ Object
151 152 153 154 155 156 157 158 159 160 161 |
# 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
163 164 165 |
# File 'lib/debug/tracer.rb', line 163 def skip_with_pattern?(tp) super && !tp.raised_exception.inspect.match?(@pattern) end |