try_stack: Evaluate an expression multiple times and if fails, exit R...

Description Usage Arguments Value

View source: R/try_stack.R

Description

Evaluate an expression multiple times and if fails, exit R with an exit_code. This is a wrapper that combines functionality of try_with_exit_code and with_retries.

Usage

1
try_stack(expr, num_tries = 1, sleep_secs = 0.001, exit_code = 1)

Arguments

expr

expression. The expression to evaluate.

num_tries

numeric. The number of attempts.

exit_code

numeric. The value of the exit_code to exit R.

sleep

numeric. How long to wait between attempts.

Value

TRUE if the expression gets evaluated successfully; exit R otherwise.


peterhurford/handlr documentation built on May 25, 2019, 1:50 a.m.