https://github.com/cran/SoDA
Revision e3fb24ebd97f7686caee78bcef4e558b908a465e authored by jmc on 01 December 2007, 00:00:00 UTC, committed by Gabor Csardi on 01 December 2007, 00:00:00 UTC
1 parent 1c016a1
Raw File
Tip revision: e3fb24ebd97f7686caee78bcef4e558b908a465e authored by jmc on 01 December 2007, 00:00:00 UTC
version 0.97-1
Tip revision: e3fb24e
muststop.Rd
\name{muststop}
\alias{muststop}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Test for an expression that should result in an error}
\description{
 This function tests the assertion that there is an error in the expression and therefore that evaluating it will generate an error condition.
}
\usage{
muststop(expr, silent = TRUE)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{expr}{ Any R expression }
    \item{silent}{if \code{FALSE}, the error message will be reported.}
}
\value{
  If an error is generated, the function returns the corresponding \code{\link{condition}} object; if not, then \code{muststop()} will itself generate an error.
}

\seealso{\code{\link{stopifnot}}}
\examples{
muststop(sqrt("abc"))
}
\keyword{programming }
back to top