Skip to content

Commit b04e0e7

Browse files
committed
make missing eval_time error in augment more informative
1 parent 07961a0 commit b04e0e7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: parsnip
22
Title: A Common API to Modeling and Analysis Functions
3-
Version: 1.1.1.9007
3+
Version: 1.1.1.9008
44
Authors@R: c(
55
person("Max", "Kuhn", , "max@posit.co", role = c("aut", "cre")),
66
person("Davis", "Vaughan", , "davis@posit.co", role = "aut"),

R/augment.R

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,12 @@ augment_censored <- function(x, new_data, eval_time = NULL) {
128128

129129
if (spec_has_pred_type(x, "survival")) {
130130
if (is.null(eval_time)) {
131-
rlang::abort(
132-
"The `eval_time` argument is missing, with no default.",
131+
cli::cli_abort(
132+
c(
133+
x = "The {.arg eval_time} argument is missing, with no default.",
134+
i = "{.arg eval_time} is required to be able to calculate \\
135+
predictions of survival probability."
136+
),
133137
call = caller_env()
134138
)
135139
}

0 commit comments

Comments
 (0)