Handle runtime errors
handle_error.Rd
Evaluates the given expression and then runs the on_success
, on_error
, or on_warning
expressions depending on the result of the initial evaluation.
Arguments
- expr
Expression to evaluate
- on_success
Expression to evaluate if
expr
succeeds- on_error
Expression to evaluate if
expr
generates an error- on_warning
Expression to evaluate if
expr
generates a warning- finally
Expression to evaluate after
expr
andon_success
oron_error
oron_warning
, usually used for cleanup.