abort: Signal an error, warning, or message with cli formatting

View source: R/abort.R

abortR Documentation

Signal an error, warning, or message with cli formatting

Description

Signal an error, warning, or message with cli formatting

Usage

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 2023-02-08.

See Also

  • cli::cli_abort().

  • cli::cli_inform().

  • cli::cli_warn().

  • simpleCondition().

  • simpleError().

  • simpleWarning().

  • simpleMessage().

Examples

x <- "hello world"
try({
    abort(x)
})
try({
    warn(x)
})
inform(x)

acidgenomics/r-acidcli documentation built on Oct. 15, 2023, 6:57 p.m.