The R Project SVN R

Rev

Rev 63197 | Rev 76421 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 63197 Rev 63205
Line 11... Line 11...
11
  supplied expression produces an error, a warning or one of a
11
  supplied expression produces an error, a warning or one of a
12
  specified list of conditions, respectively.  If the assertion fails,
12
  specified list of conditions, respectively.  If the assertion fails,
13
  an error is signalled.
13
  an error is signalled.
14
}
14
}
15
\usage{
15
\usage{
16
assertError(expr)
16
assertError(expr, verbose = FALSE)
17
assertWarning(expr)
17
assertWarning(expr, verbose = FALSE)
18
assertCondition(expr, ..., .exprString = )
18
assertCondition(expr, ..., .exprString = , verbose = FALSE)
19
}
19
}
20
\arguments{
20
\arguments{
21
  \item{expr}{an unevaluated \R expression which will be evaluated via
21
  \item{expr}{an unevaluated \R expression which will be evaluated via
22
    \code{\link{tryCatch}(expr, ..)}.}
22
    \code{\link{tryCatch}(expr, ..)}.}
23
  \item{\dots}{\code{\link{character}} strings corresponding to the
23
  \item{\dots}{\code{\link{character}} strings corresponding to the
Line 29... Line 29...
29
      deparsed.  Will be omitted if the function is supplied with the
29
      deparsed.  Will be omitted if the function is supplied with the
30
      actual expression to be tested.  If \code{assertCondition()} is
30
      actual expression to be tested.  If \code{assertCondition()} is
31
      called from another 
31
      called from another 
32
        function, with the actual expression passed as an argument to
32
        function, with the actual expression passed as an argument to
33
        that function, supply the deparsed version.}
33
        that function, supply the deparsed version.}
-
 
34
  \item{verbose}{If \code{TRUE}, a message is printed when the
-
 
35
        condition is satisfied.}
34
}
36
}
35
\details{
37
\details{
36
  \code{assertCondition()} uses the general condition mechanism to
38
  \code{assertCondition()} uses the general condition mechanism to
37
  check all the conditions generated in evaluating \code{expr}.  The
39
  check all the conditions generated in evaluating \code{expr}.  The
38
  occurrence of any of the supplied condition classes among these satisfies the
40
  occurrence of any of the supplied condition classes among these satisfies the