Hello I wanted to try out your gem, so I used the example code in the README:
require 'mulligan'
def calling_method
method_that_raises
"SUCCESS"
rescue Exception
puts "RESCUED"
recover IgnoringRecovery
puts "HANDLED"
end
def method_that_raises
puts "RAISING"
case recovery
when IgnoringRecovery
puts "IGNORING"
else
raise "You can ignore this"
end
puts "AFTER RAISE"
end
calling_method
But when executing it, I got:
ruby mulligan.rb
RAISING
RESCUED
mulligan.rb:8:in rescue in calling_method': uninitialized constant IgnoringRecovery (NameError) from mulligan.rb:4:incalling_method'
from mulligan.rb:24:in `'
I dont know what I'm doing wrong. I'm running ruby vesion: 2.1.7p400.
Hello I wanted to try out your gem, so I used the example code in the README:
But when executing it, I got:
ruby mulligan.rb
RAISING RESCUED mulligan.rb:8:in'
rescue in calling_method': uninitialized constant IgnoringRecovery (NameError) from mulligan.rb:4:in
calling_method' from mulligan.rb:24:in `I dont know what I'm doing wrong. I'm running ruby vesion: 2.1.7p400.
Thank you