Add ability to abort the processing of outputs

abortOutput() leaves the state of the output unchanged,
unlike req(), validate(), or stop().
This commit is contained in:
Joe Cheng
2016-02-19 00:32:24 -08:00
parent 517c5d356f
commit 4e91af4d64
4 changed files with 48 additions and 3 deletions

20
man/abortOutput.Rd Normal file
View File

@@ -0,0 +1,20 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{abortOutput}
\alias{abortOutput}
\title{Abort processing the current output}
\usage{
abortOutput()
}
\description{
Signals an error that Shiny treats specially if an output is currently being
evaluated. Execution will stop, but rather than clearing the output (as
\code{\link{req}} does) or showing an error message (as \code{\link{stop}}
does), the output simply remains unchanged.
}
\details{
If \code{abortOutput} is called in any non-output context (like in an
\code{\link{observe}} or \code{\link{observeEvent}}), the effect is the same
as \code{\link{req}(FALSE)}.
}