Signal an error, warning, or message with cli formatting

abort(x, call = TRUE)

inform(x)

warn(x)

Arguments

x

character or condition (i.e. returned from stop or warning).

call

logical(1). Include call information in the return message.

Value

Console output, with invisible return of x input.

Note

Updated 2021-08-18.

See also

Examples

x <- "hello world" try({ abort(x) })
#> Error : hello world
try({ warn(x) })
#> Warning: hello world
inform(x)
#>
#> hello world