diff --git a/R/grids.R b/R/grids.R index 192612aa..03d5e19c 100644 --- a/R/grids.R +++ b/R/grids.R @@ -162,7 +162,7 @@ make_regular_grid <- function(..., parameters <- dplyr::filter(parameters, !!filter_quo) } - new_param_grid(parameters, call = call) + new_param_grid(parameters) } # ------------------------------------------------------------------------------ @@ -252,16 +252,15 @@ make_random_grid <- function(..., parameters <- dplyr::filter(parameters, !!filter_quo) } - new_param_grid(parameters, call = call) + new_param_grid(parameters) } # ------------------------------------------------------------------------------ -new_param_grid <- function(x = new_data_frame(), call = caller_env()) { +new_param_grid <- function(x = new_data_frame()) { if (!is.data.frame(x)) { cli::cli_abort( - "{.arg x} must be a data frame to construct a new grid from.", - call = call + "{.arg x} must be a data frame to construct a new grid from." ) } diff --git a/R/space_filling.R b/R/space_filling.R index 442c009f..d696f169 100644 --- a/R/space_filling.R +++ b/R/space_filling.R @@ -234,7 +234,7 @@ make_sfd <- function(..., ) } - new_param_grid(grid, call = call) + new_param_grid(grid) } base_recycle <- function(x, size) { diff --git a/tests/testthat/_snaps/grids.md b/tests/testthat/_snaps/grids.md index 967c0b7b..19da2638 100644 --- a/tests/testthat/_snaps/grids.md +++ b/tests/testthat/_snaps/grids.md @@ -106,6 +106,6 @@ Code new_param_grid(as.matrix(x)) Condition - Error: + Error in `new_param_grid()`: ! `x` must be a data frame to construct a new grid from.