Skip to content

Instantly share code, notes, and snippets.

@Supernats
Last active August 27, 2015 00:19
Show Gist options
  • Select an option

  • Save Supernats/1da7a7e1d5b532b07e6a to your computer and use it in GitHub Desktop.

Select an option

Save Supernats/1da7a7e1d5b532b07e6a to your computer and use it in GitHub Desktop.
def does_begin_matter?
puts "i want these errors to bork everything"
raise "BEFORE"
begin
raise "AFTER"
rescue => e
puts "I'll handle these errors specially"
puts "#{e}"
end
end
does_begin_matter?
# => i want these errors to bork everything
# => begin.rb:3:in `does_begin_matter?': BEFORE (RuntimeError)
# => from begin.rb:12:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment