try_error | R Documentation |
Use tryCatch()
to check if an expression throws an error.
try_error(expr)
expr |
An R expression. |
TRUE
(error) or FALSE
(success).
xfun::try_error(stop("foo")) # TRUE
xfun::try_error(1:10) # FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.