Skip to content

Instantly share code, notes, and snippets.

Created June 18, 2015 22:37
Show Gist options
  • Save anonymous/792a44e4a75fbcbc05e6 to your computer and use it in GitHub Desktop.
Save anonymous/792a44e4a75fbcbc05e6 to your computer and use it in GitHub Desktop.
begin
response = call_api # this might throw X
response.save_to_db # this might throw Y
rescue X
# handle the error with calling the api
rescue Y
# handle the error with saving to the database
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment