dispense_collected: Return the value after raising all collected conditions

Description Usage Arguments

Description

This function takes in the collected conditions list that is the output of catch_expr() or a function from make_catch_fn(), raises all the conditions that were collected, and then returns the value the original evaluated expression had returned. This might be useful in situations in which one had collected conditions from a remote evaluation of an expression, and wishes to raise the conditions locally.

The way the errors are treated can be changed as well: they can either be raised as-is, displayed on screen, or raised as warnings.

Usage

1
dispense_collected(l, treat_errs = c("raise", "display", "warn"))

Arguments

l

The results of catch_expr() or a function from make_catch_fn()

treat_errs

One of three strings governing how errors are treated: "raise" which will simply raise errors as they are, "display" which will just print the error messages on-screen, and "warn" which will raise the errors as warnings.


catchr documentation built on Aug. 31, 2020, 5:11 p.m.