类 DEBUGGER__::ExceptionTracer

公共实例方法

setup() 点击切换源代码
# File debug-1.10.0/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) 点击切换源代码
# File debug-1.10.0/lib/debug/tracer.rb, line 163
def skip_with_pattern?(tp)
  super && !tp.raised_exception.inspect.match?(@pattern)
end