Skip to content

Commit

Permalink
use abort instead of stop in endless horse
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Nov 2, 2024
1 parent 2f648f2 commit b0326d4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions R/endless_horse.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@
endless_horse <- function(what = "Hello world!", endless = TRUE, wait = 0.5,
what_color = NULL, horse_color = NULL) {
if (!is_null(what_color) & !(inherits(what_color, c("crayon", "character")))) {
stop("what_color must be of class character or crayon",
call. = FALSE
)
abort("what_color must be of class character or crayon")
}

if (!is_null(horse_color) & !(inherits(horse_color, c("crayon", "character")))) {
stop("by_color must be of class character or crayon",
call. = FALSE
)
abort("by_color must be of class character or crayon")
}

if (!is_null(what_color) & is_character(what_color)) {
Expand Down

0 comments on commit b0326d4

Please sign in to comment.