Safely wrap expression x
such that shiny application does
no hang when when the expression raises error.
Usage
safe_observe(
x,
env = NULL,
quoted = FALSE,
priority = 0L,
domain = NULL,
...,
error_wrapper = c("none", "notification", "alert")
)
Arguments
- x, env, quoted, priority, domain, ...
passed to
observe
- error_wrapper
handler when error is encountered, choices are
'none'
,'notification'
(seeerror_notification
), or'alert'
(seeerror_alert
)
Examples
values <- shiny::reactiveValues(A=1)
obsB <- safe_observe({
print(values$A + 1)
})