handle_try_catch: Hanle possible errors and warnings

Description Usage Arguments

View source: R/logging.R

Description

Use the logging api for handling errors/warnings for a specific function that might fail.

Usage

1
handle_try_catch(f, errmsg, warnmsg, stop = TRUE)

Arguments

f

The function to wrap

errmsg

String. The message to put if an error occurs

warnmsg

String. The message to put if a warning occurs

stop

Bool. Cause the script to stop after logging if error occurs?


lindberg-m/contextendR documentation built on Jan. 8, 2022, 3:16 a.m.