Retry the given block of code until it's successful. Note this method throws exceptions for non-successful outcomes from retrying.