Skip to contents

A thin wrapper around LogMessage() that emits an "ERROR"-level message (triggering cli::cli_abort()) when cnd is TRUE.

Usage

stop_if(cnd, message)

Arguments

cnd

Logical scalar. When TRUE, an error is raised.

message

Character string to display; may contain glue-style placeholders.

Value

NULL, invisibly, if cnd is FALSE. Does not return if cnd is TRUE.