-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Analogously, to setDoPar(), the setDoSeq() function attempts to undo partially set variables in case there's an error;
Lines 31 to 47 in 731cff6
| setDoSeq <- function(fun, data=NULL, info=function(data, item) NULL) { | |
| tryCatch( | |
| { | |
| assign('seqFun', fun, pos=.foreachGlobals, inherits=FALSE) | |
| assign('seqData', data, pos=.foreachGlobals, inherits=FALSE) | |
| assign('seqInfo', info, pos=.foreachGlobals, inherits=FALSE) | |
| }, error = function(e) { | |
| if (exists('fun', where=.foreachGlobals, inherits=FALSE)) | |
| remove('fun', envir = .foreachGlobals) | |
| if (exists('data', where=.foreachGlobals, inherits=FALSE)) | |
| remove('data', envir = .foreachGlobals) | |
| if (exists('info', where=.foreachGlobals, inherits=FALSE)) | |
| remove('info', envir = .foreachGlobals) | |
| e | |
| }) | |
| } | |
However, due to what looks like a cut'n'paste mistake from setDoPar(), setDoSeq() removes the wrong variables.
Metadata
Metadata
Assignees
Labels
No labels