Logs the error message to console before failing

log_failure(expression)

Arguments

expression

call

Examples

log_failure("foobar")
#> [1] "foobar"
try(log_failure(foobar))
#> ERROR [2025-09-17 13:55:13] object 'foobar' not found
#> Error in eval(expr, envir) : object 'foobar' not found