try({
# Assert that a variable is reactive
x <- shiny::reactive(1)
assert_reactive(x) # does nothing
# Assert that a variable is not a list
x <- 1
assert_reactive(x) # stops execution and prints an error message
})
Run the code above in your browser using DataLab