% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{try_error} \alias{try_error} \title{Try an expression and see if it throws an error} \usage{ try_error(expr) } \arguments{ \item{expr}{An R expression.} } \value{ \code{TRUE} (error) or \code{FALSE} (success). } \description{ Use \code{\link[=tryCatch]{tryCatch()}} to check if an expression throws an error. } \examples{ xfun::try_error(stop("foo")) # TRUE xfun::try_error(1:10) # FALSE }