Sha256: aeaf4e5d7bbd8b414bf994095b4058cf6f85422829bb1c6101963f1c74f21c31

Contents?: true

Size: 420 Bytes

Versions: 4

Compression:

Stored size: 420 Bytes

Contents

unless Object.const_defined? :PryExceptionExplorer
  $:.unshift File.expand_path '../../lib', __FILE__
  require 'pry'
end

require 'pry-exception_explorer'

EE.inline!
PryExceptionExplorer.intercept(ArgumentError)

def alpha
  name = "john"
  beta
  puts name
end

def beta
  x = "john"
  gamma(x)
end

def gamma(x)
  raise ArgumentError, "x must be a number!" if !x.is_a?(Numeric)
  puts "2 * x = #{2 * x}"
end

alpha

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pry-exception_explorer-0.2.3 examples/example_inline.rb
pry-exception_explorer-0.2.2 examples/example_inline.rb
pry-exception_explorer-0.2.1 examples/example_inline.rb
pry-exception_explorer-0.2.0 examples/example_inline.rb