Skip to content

Instantly share code, notes, and snippets.

@trivektor
Created July 17, 2011 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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