Skip to content

Commit eab9951

Browse files
committed
Shorten error message
1 parent c73c8bd commit eab9951

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

R/modifiers.R

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,7 @@ type.stringr_fixed <- function(x, error_call = caller_env()) {
218218
type.character <- function(x, error_call = caller_env()) {
219219
if (any(is.na(x))) {
220220
cli::cli_abort(
221-
tr_(
222-
"{.arg pattern} must be a character vector that does not contain NAs."
223-
),
221+
tr_("{.arg pattern} can not contain NAs."),
224222
call = error_call
225223
)
226224
}

tests/testthat/_snaps/modifiers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@
3535
type(c("a", "b", NA_character_, "c"))
3636
Condition
3737
Error:
38-
! `pattern` must be a character vector that does not contain NAs.
38+
! `pattern` can not contain NAs.
3939

0 commit comments

Comments
 (0)