From e0467e70632604b7a347cf0d341db864d769edcd Mon Sep 17 00:00:00 2001 From: Julia Silge Date: Fri, 29 Sep 2023 11:49:24 -0600 Subject: [PATCH] Better error message --- R/pin-read-write.R | 2 +- tests/testthat/_snaps/pin-read-write.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/pin-read-write.R b/R/pin-read-write.R index a1be276c..8590bb3e 100644 --- a/R/pin-read-write.R +++ b/R/pin-read-write.R @@ -82,7 +82,7 @@ pin_write <- function(board, x, check_board(board, "pin_write", "pin") dots <- list2(...) if (!is_empty(dots) && is.null(names(dots[1]))) { - cli::cli_abort('The {.arg type} argument must be named, like {.code type = "{dots[[1]]}"}.') + cli::cli_abort('Arguments after the dots `...` must be named, like {.code type = "{dots[[1]]}"}.') } if (is.null(name)) { diff --git a/tests/testthat/_snaps/pin-read-write.md b/tests/testthat/_snaps/pin-read-write.md index 2d3ea0df..9a83a965 100644 --- a/tests/testthat/_snaps/pin-read-write.md +++ b/tests/testthat/_snaps/pin-read-write.md @@ -23,7 +23,7 @@ pin_write(board, mtcars, name = 1:10, "json") Condition Error in `pin_write()`: - ! The `type` argument must be named, like `type = "json"`. + ! Arguments after the dots `...` must be named, like `type = "json"`. Code pin_write(board, mtcars, name = "mtcars", type = "froopy-loops") Condition