Skip to content

Instantly share code, notes, and snippets.

@vemarav
Last active February 7, 2018 18:15
Show Gist options
  • Save vemarav/ab3c0deff4a049bd904c0a8c84de1da0 to your computer and use it in GitHub Desktop.
Save vemarav/ab3c0deff4a049bd904c0a8c84de1da0 to your computer and use it in GitHub Desktop.
begin
# code that raise an Error
# or an Exception
rescue StandardError => e
# Exceptions are not rescued. But,
# StandardError and subclasses
# of StandardError are rescued
puts e.message, e.backtrace,
# puts e.full_message, e.backtrace_locations
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment