Created
April 21, 2016 18:53
-
-
Save bparanj/a099481e024e6901d114331460264b76 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def run_with_exception_handling | |
begin | |
puts '1' | |
v = yield | |
puts v | |
rescue Exception | |
puts 'Exception thrown' | |
end | |
end | |
def test_runner | |
run_with_exception_handling do | |
400 | |
end | |
end | |
test_runner |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment