class Pry::LastException
def bt_source_location_for(index)
def bt_source_location_for(index) backtrace[index] =~ /(.*):(\d+)/ [::Regexp.last_match(1), ::Regexp.last_match(2).to_i] end
def inc_bt_index
def inc_bt_index @bt_index = (@bt_index + 1) % backtrace.size end
def initialize(exception)
def initialize(exception) @exception = exception @bt_index = 0 @file, @line = bt_source_location_for(0) end
def method_missing(name, *args, &block)
def method_missing(name, *args, &block) if @exception.respond_to?(name) @exception.public_send(name, *args, &block) else super end end
def respond_to_missing?(name, include_all = false)
def respond_to_missing?(name, include_all = false) @exception.respond_to?(name, include_all) end
def wrapped_exception
-
(Exception)
-
def wrapped_exception @exception end