Retry blocks of code when they raise an exception.