added retry_with_exception helper