Skip to content

Commit 61c452d

Browse files
committed
break up message into multiple lines
1 parent 02be9dc commit 61c452d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

R/logistic_reg.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ check_args.logistic_reg <- function(object, call = rlang::caller_env()) {
145145
if (object$engine == "LiblineaR") {
146146
if (is.numeric(args$mixture) && !args$mixture %in% 0:1) {
147147
cli::cli_abort(
148-
"For the {.pkg LiblineaR} engine, mixture must be 0 or 1,\\
149-
not {args$mixture}.\\
150-
Choose a pure ridge model with {.code mixture = 0}.\\
151-
Choose a pure lasso model with {.code mixture = 1}.\\
152-
The {.pkg Liblinear} engine does not support other values.",
148+
c("x" = "For the {.pkg LiblineaR} engine, mixture must be 0 or 1,\\
149+
not {args$mixture}.",
150+
"i" = "Choose a pure ridge model with {.code mixture = 0} or \\
151+
a pure lasso model with {.code mixture = 1}.",
152+
"!" = "The {.pkg Liblinear} engine does not support other values."),
153153
call = call
154154
)
155155
}

tests/testthat/_snaps/logistic_reg.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@
5757
fit(spec, Class ~ ., lending_club)
5858
Condition
5959
Error in `fit()`:
60-
! For the LiblineaR engine, mixture must be 0 or 1,not 0.5.Choose a pure ridge model with `mixture = 0`.Choose a pure lasso model with `mixture = 1`.The Liblinear engine does not support other values.
60+
x For the LiblineaR engine, mixture must be 0 or 1,not 0.5.
61+
i Choose a pure ridge model with `mixture = 0` or a pure lasso model with `mixture = 1`.
62+
! The Liblinear engine does not support other values.
6163

6264
---
6365

0 commit comments

Comments
 (0)