Learn R Programming

eyeris (version 3.0.1)

log_error: Log an error message and abort

Description

Log an error message and abort

Usage

log_error(..., wrap = TRUE, .envir = parent.frame())

Arguments

...

Character strings to log. Supports glue-style interpolation.

wrap

Logical. Whether to wrap long messages (default TRUE).

.envir

Environment for glue interpolation (default: parent frame).

Examples

Run this code
if (FALSE) {
log_error("Critical error occurred")
file_path <- "missing.csv"
log_error("File not found: {file_path}")
}

Run the code above in your browser using DataLab