Description Usage Arguments Details Value Author(s) See Also Examples
Try-catch wrapper, keeping error traceback and conditions
1 | tryKeepConditions(expr)
|
expr |
Expression to evaluate |
This is a try-catch wrapper. It returns a list with four elements:
$valueThe value of the evaluated expression, or NULL if an error was thrown and execution did not complete
$messagesA list of message objects, each being a message thrown during the execution, in order
$warningsA list of condition objects, each being a message thrown during the execution, in order
$errorNULL if there was no error, otherwise the error object, which can then be passed to getTraceback
to retrieve the error
The elements of the $messages, $warnings and $error are all actually two-element lists, the first being
the condition object itself (named $message, $warning or $error) and the second begin the call stack
as returned by sys.calls() and named $calls.
The class of this object is set as "AnalysisPageValueWithConditions"
AnalysisPageValueWithConditions
Brad Friedman
vwc.conditions vwc.error vwc.error.condition vwc.error.traceback vwc.is.error vwc.messages vwc.messages.conditions vwc.messages.tracebacks vwc.n vwc.n.messages vwc.n.warnings vwc.tracebacks vwc.value vwc.warnings vwc.warnings.conditions vwc.warnings.tracebacks
1 2 | value.with.warning <- tryKeepConditions({warning("warning message"); 3})
value.with.error <- tryKeepConditions({stop("err message")})
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.