% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/try.R
\name{\%except\%}
\alias{\%except\%}
\title{Try to evaluate an expressions and evaluate another expression on
exception}
\usage{
try \%except\% except
}
\arguments{
\item{try}{R expression}

\item{except}{fallback R expression to be evaluated if \code{try} fails}
}
\description{
Try to evaluate an expressions and evaluate another expression on
exception
}
\note{
Suppress log messages in the \code{except} namespace if you don't
want to throw a \code{WARN} log message on the exception branch.
}
\examples{
everything \%except\% 42
everything <- "640kb"
everything \%except\% 42

FunDoesNotExist(1:10) \%except\% sum(1:10) / length(1:10)
FunDoesNotExist(1:10) \%except\% (sum(1:10) / length(1:10))
FunDoesNotExist(1:10) \%except\% MEAN(1:10) \%except\% mean(1:10)
FunDoesNotExist(1:10) \%except\% (MEAN(1:10) \%except\% mean(1:10))
}
