From b8fed3256dfca07f3766e569a998f8c61493d640 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Sat, 4 Nov 2023 12:48:24 -0700 Subject: [PATCH] incorporate conditionCall() --- R/settings.R | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/R/settings.R b/R/settings.R index c02f0937d..207d710ae 100644 --- a/R/settings.R +++ b/R/settings.R @@ -74,11 +74,17 @@ read_config_file <- function(config_file) { tryCatch( eval(parsed_setting), error = function(e) { - stop("Error from config setting '", setting, "':\n ", conditionMessage(e)) + stop( + "Error from config setting '", setting, "' at call '", format(conditionCall(e)), "':\n", + " ", conditionMessage(e) + ) } ), warning = function(w) { - warning("Warning from config setting '", setting, "':\n ", conditionMessage(w)) + warning( + "Warning from config setting '", setting, "' at call '", format(conditionCall(w)), "':\n", + " ", conditionMessage(w) + ) invokeRestart("muffleWarning") } )