I have some code that passes tests in rspec. It appears I don't need end
with a double rescue
in Ruby, or even begin
for that matter. Essentially, I return 5
when a Geocoder error is encountered and 6
if a CustomError is encounted and 7
otherwise.
def get_stuff
puts "some code work"
rescue ::Geocoder::Error => e
puts "hello"
return 5
rescue CustomError => e
puts "world"
return 6
7
end