Skip to content

Instantly share code, notes, and snippets.

@trivektor
Created July 17, 2011 20:03
Show Gist options
  • Save trivektor/1087995 to your computer and use it in GitHub Desktop.
Save trivektor/1087995 to your computer and use it in GitHub Desktop.
Handling exception in loop
for i in 1..5
begin
do_something_that_might_raise_exceptions(i)
rescue
next # do_something_* again, with the next i
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment