svmartin
1/12/2017 - 7:24 PM

exception_handling.rb

# outside a method
begin
  # code that could explode
rescue
  # handle exception here
end

# inside a method
def mi_method
  # code that could explode
rescue
  # handle exception here
end