Skip to content

Commit

Permalink
incorporate conditionCall()
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico committed Nov 4, 2023
1 parent b73702b commit b8fed32
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions R/settings.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
)
Expand Down

0 comments on commit b8fed32

Please sign in to comment.