Skip to content

Instantly share code, notes, and snippets.

@scudelletti
Created August 22, 2013 19:29
Show Gist options
  • Save scudelletti/6311712 to your computer and use it in GitHub Desktop.
Save scudelletti/6311712 to your computer and use it in GitHub Desktop.
Handling Exceptions
puts "Getting the Exception 1"
begin
eval("1+")
rescue Exception => e
puts "Exception Class => #{e.class} - Message: #{e}"
end
puts "Getting the Exception 2"
begin
eval("1+")
rescue => e
puts "Exception Class => #{e.class} - Message: #{e}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment