try_get_model: Try getting results from expression

Description Usage Arguments Details Value

View source: R/error_handling.R

Description

The function get_trial_list() tries to execute the expression handed over and returns a list of the outcome.

Usage

1

Arguments

expr

An expression to be executed.

Details

The function tries to execute the expression handed over. It case of an error it does not stop execution but in any case returns a list as specified in chapter Value. If execution of the expression was successful, the results are stored in element Model. In case of warnings or errors, the messages are silently redirected to the elements Warning or Error, respectively.

Value

A list of length three with the following elements is returned

Model

The object returned by the expression, if applicable, or otherwise NULL

Warning

A warning message, if applicable, or otherwise NULL

Error

An error message, if applicable, or otherwise NULL


disprofas documentation built on Dec. 8, 2021, 5:10 p.m.