From fce9cc9bdc12923336b12589e459ff820f5f0c8d Mon Sep 17 00:00:00 2001 From: olivroy Date: Wed, 13 Dec 2023 11:54:29 -0500 Subject: [PATCH] Improve popup.vars error message to help the user to be directed to the correct place. --- R/step1_helper_facets.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/step1_helper_facets.R b/R/step1_helper_facets.R index d7a32ec8..6e5cc9f5 100644 --- a/R/step1_helper_facets.R +++ b/R/step1_helper_facets.R @@ -169,8 +169,7 @@ step1_rearrange_facets = function(tmo, o) { popup.format = process_label_format(popup.format, o$label.format) if (!all(popup.vars %in% smeta$vars)) { - # TODO add a more informative message that says which variables are incorrect. - stop("Incorrrect popup.vars specification", call. = FALSE) + rlang::arg_match(popup.vars, values = smeta$vars, multiple = TRUE) } if (length(popup.vars)) add_used_vars(popup.vars)