Basically, I want to do something like this (in Python or similar imperative languages):
for i in xrange(1, 5): try: do_something_that_might_raise_exceptions(i) except: continue
How to do it in Ruby? I know there are redo and retry , but they seem to re-execute the try block, rather than continuing the loop:
for i in 1..5 begin do_something_that_might_raise_exceptions(i) rescue retry
ruby loops exception-handling
Santa Apr 12 2018-10-12T00: 00Z
source share