catchEvent {msProcess} | R Documentation |
Catches a history event that has been thrown, extracts the history, and attaches/updates the history in the primary input object.
catchEvent(x, histname="event.history", envir=NULL)
x |
an object of arbitrary class. Optionally, this input may already contain an event history in which case the history is updated after being caught. Otherwise the new history is attached. |
envir |
the frame in S-PLUS (or environment in R) designated for the processing
and storage of pipeline history data. Default: msProcessEnv ,
a global environment impicitly set by a previous
call to throwEvent . In general, the user should rely
on the specified default value. |
histname |
a character string defining the name of the history
variable stored in the specified frame. Default: "event.history" . |
a replication of x
with the event history updated/attached.
If available, the last entry of the specified histname
object
(a list located in the specified frame) is extracted and written to the
input x
via the msSet
constructor function. If no other entries
exist after extraction, the histname
list is deleted from the specified
frame.
throwEvent
, assignEvent
, isProcessRecorded
, eventHistory
.
## throw an event envir <- msGlobalEnv() throwEvent("Superbowl XL", envir=envir) ## assign data to the thrown event record <- list(NFC="Seattle Seahawks", AFC="Pittsburgh Steelers") assignEvent(record) ## catch event catchEvent(NULL)