1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
% 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}()} to check if an expression throws an error.
}
\examples{
xfun::try_error(stop("foo")) # TRUE
xfun::try_error(1:10) # FALSE
}
|