From 2ad2474ed99f3d898d3e13ba511a8041e0e89c84 Mon Sep 17 00:00:00 2001 From: Teun van den Brand <49372158+teunbrand@users.noreply.github.com> Date: Mon, 9 Oct 2023 09:30:30 +0200 Subject: [PATCH] Clarify error message --- R/utilities-patterns.R | 2 +- tests/testthat/_snaps/patterns.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/utilities-patterns.R b/R/utilities-patterns.R index b7a97b3a3f..030ad6b742 100644 --- a/R/utilities-patterns.R +++ b/R/utilities-patterns.R @@ -36,7 +36,7 @@ fill_alpha <- function(fill, alpha) { # key that is trying to draw a single colour. It can be given that colour # as a list due to patterns in other keys. msg <- paste0( - "{.field fill} must be a valid colour or list of ", + "{.field fill} must be a vector of colours or list of ", "{.cls GridPattern} objects." ) # If single colour list, try applying `alpha()` diff --git a/tests/testthat/_snaps/patterns.md b/tests/testthat/_snaps/patterns.md index 9582595d23..5a9374a4d6 100644 --- a/tests/testthat/_snaps/patterns.md +++ b/tests/testthat/_snaps/patterns.md @@ -1,8 +1,8 @@ # fill_alpha works as expected - fill must be a valid colour or list of objects. + fill must be a vector of colours or list of objects. --- - fill must be a valid colour or list of objects. + fill must be a vector of colours or list of objects.