Skip to content

Request for stopifnot

1 message · Tim Taylor

#
Would R-core be receptive to adding an additional parameter to stopifnot so we can hide the call in the output as in stop?

i.e. The signature would become:
stopifnot2 <- function (..., exprs, exprObject, local = TRUE, .call = TRUE)

It looks like this would be a one-line change to the the underlying stop call to:
stop(simpleError(msg, call = if((p <- sys.parent(1L)) && isTRUE(.call)) sys.call(p)))

Best

Tim