Skip to content

Commit

Permalink
Added eval_when_ready to dev toolbox
Browse files Browse the repository at this point in the history
  • Loading branch information
dipterix committed Oct 23, 2019
1 parent 53bc4ac commit 3b3515a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions inst/template/inst/tools/funcs_reactives.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,20 @@ reactiveValues <- function(...){
}


eval_when_ready <- function(f){
if(is_local_debug()){
env = parent.frame()
# TODO what to do?
tryCatch({
f(env)
}, error = function(e){
cat2(e)
})
}else{
eval_when_ready = get('eval_when_ready', parent.env(parent.env(..param_env)))
eval_when_ready(f)
}
}



Expand Down

0 comments on commit 3b3515a

Please sign in to comment.