Skip to contents

The opposite of suppressWarnings(). This will immediately error if a warning if thrown by expr. This is useful to track down the source of a random and to prevent Rs permissive approach to data transformations. It is also useful to identify where in the code a intermittent rlang warning is being issued once every 8 hours.

Usage

escalate(expr)

Arguments

expr

expression to evaluate

Value

the evaluated expression or an error

Examples

try(escalate(as.integer("ASDAS")))
#> Error : NAs introduced by coercion

try(escalate(rlang::warn("test", .frequency="regularly", .frequency_id = "asdasdasasdd")))
#> Error : test
try(escalate(rlang::warn("test", .frequency="regularly", .frequency_id = "asdasdasasdd")))
#> Error : test
try(escalate(rlang::warn("test", .frequency="regularly", .frequency_id = "asdasdasasdd")))
#> Error : test
try(escalate(rlang::warn("test", .frequency="regularly", .frequency_id = "asdasdasasdd")))
#> Error : test

# options("rlib_warning_verbosity"=NULL)
# options("rlib_warning_verbosity"="verbose")
# "lifecycle_verbosity"="warning"