Retries when exception occurs.