Report abuse

1
2
3
4
5
6
7
8
9
10
11
def try
  i = 0
  loop do
    begin
      perform_action
    rescue Timeout
      i += 1
      raise SighIGiveUpException, "i can't :(" if i > 5
    end
  end
end