Skip to content

Commit 614f42f

Browse files
committed
use abort in select_parameters()
1 parent a62ebff commit 614f42f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/helpers-mcmc.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ select_parameters <-
8888
if (length(explicit)) {
8989
if (!all(explicit %in% complete_pars)) {
9090
not_found <- which(!explicit %in% complete_pars)
91-
stop(
92-
"Some 'pars' don't match parameter names: ",
91+
abort(paste(
92+
"Some 'pars' don't match parameter names:",
9393
paste(explicit[not_found], collapse = ", "),
9494
call. = FALSE
95-
)
95+
))
9696
}
9797
}
9898

@@ -105,7 +105,7 @@ select_parameters <-
105105
}))
106106

107107
if (!length(regex_pars)) {
108-
stop("No matches for 'regex_pars'.", call. = FALSE)
108+
abort("No matches for 'regex_pars'.")
109109
}
110110
}
111111

0 commit comments

Comments
 (0)