Skip to content

Instantly share code, notes, and snippets.

@benweint
Created July 23, 2013 21:14
Show Gist options
  • Save benweint/6066245 to your computer and use it in GitHub Desktop.
Save benweint/6066245 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
def outer
outer2
rescue Exception => e
puts "Caught error: #{e}"
puts e.backtrace.join("\n")
end
def outer2
outer3
end
def outer3
recurse
end
def recurse
recurse
end
begin
outer
rescue Exception => e
puts "Caught error: #{e}"
puts e.backtrace.join("\n")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment